]> 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:18 +0000 (16:02 +0200)
commitf606798efad3f363c0c6f009235dc68d260faba8
tree96fa931b3cfa07d90cfa7394f746d4b333cf17e2
parentae7f36520a966e8b2f430f83139083864cb54fab
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