mirror of https://github.com/openssl/openssl.git
crypto/bio/bio_print.c: correctly print 0X prefix for X conversion
Per [1]: For x or X conversion specifiers, a non-zero result shall have 0x (or 0X) prefixed to it. [1] https://pubs.opengroup.org/onlinepubs/9799919799//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)
This commit is contained in:
parent
6f8beb7ce9
commit
96e021dfff
|
@ -473,7 +473,7 @@ fmtint(char **sbuffer,
|
|||
if (base == 8)
|
||||
prefix = "0";
|
||||
if (base == 16)
|
||||
prefix = "0x";
|
||||
prefix = flags & DP_F_UP ? "0X" : "0x";
|
||||
}
|
||||
if (flags & DP_F_UP)
|
||||
caps = 1;
|
||||
|
|
Loading…
Reference in New Issue