]> 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:03 +0000 (16:02 +0200)
commitcb7946a6e08cc3b7aec24cb8f865692be4e868f6
tree31cb3cd2b25296bdc9bb8836e3332de13490c65f
parentfa4d1aee27a252a4d92ec452f5a67c97769296ee
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