]> git.ipfire.org Git - thirdparty/openssl.git/commit
crypto/bio/bio_print.c: improve the precision handling in fmtint
authorEugene Syromiatnikov <esyr@openssl.org>
Fri, 15 Aug 2025 14:28:11 +0000 (16:28 +0200)
committerNeil Horman <nhorman@openssl.org>
Fri, 29 Aug 2025 16:18:30 +0000 (12:18 -0400)
commitac492027221eefcd2f015a20d3a1fd2680882a9a
treea9c3084f80af4f9c9217ed9935967e37a4b0bc13
parent2b16781c5b84e13e1429d58e10c65a51bc6fc224
crypto/bio/bio_print.c: improve the precision handling in fmtint

Per [1]:

    * A negative precision is taken as if the precision were omitted.
    * The default precision is 1.
    * For d, i, o, u, x, and X conversion specifiers, if a precision
      is specified, the '0' flag shall be ignored.

[1] https://pubs.opengroup.org/onlinepubs/9699919799/functions/printf.html

Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/28177)
crypto/bio/bio_print.c