]> git.ipfire.org Git - thirdparty/openssl.git/commit
Fix BIO_printf formatting for negative numbers formatted with %e
authorRichard Levitte <levitte@openssl.org>
Wed, 23 Apr 2025 08:26:56 +0000 (10:26 +0200)
committerTomas Mraz <tomas@openssl.org>
Thu, 24 Apr 2025 14:02:12 +0000 (16:02 +0200)
commit6dda2ddc18e7372bc67853ea96e817ad15f8ff12
tree80806cc0b02a2f11cd92f8b001246d127ddb0538
parent9f2eb6d35a35d1efdf39ef295ac3dea2436dc08a
Fix BIO_printf formatting for negative numbers formatted with %e

Some parts of the formatting code assumed that the input number is
positive.  This is fixed by working on its absolute value.

test/bioprinttest.c is amended to test the output of negative numbers
as well.

Fixes #26973

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/27478)

(cherry picked from commit fb555eb7a1d523e9df5584b44d16d0f72417bd19)
crypto/bio/bio_print.c
test/bioprinttest.c