From: shridhar kalavagunta Date: Sat, 27 Jan 2024 03:10:32 +0000 (-0600) Subject: Fix off by one issue in buf2hexstr_sep() X-Git-Tag: openssl-3.1.6~94 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0c78270e7bb1757348cbe23a132fcce34af1cdfe;p=thirdparty%2Fopenssl.git Fix off by one issue in buf2hexstr_sep() Fixes #23363 Reviewed-by: Tom Cosgrove Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/23404) (cherry picked from commit c5cc9c419a0a8d97a44f01f95f0e213f56da4574) --- diff --git a/crypto/o_str.c b/crypto/o_str.c index 3354ce0927d..f9e04f22ed8 100644 --- a/crypto/o_str.c +++ b/crypto/o_str.c @@ -251,7 +251,7 @@ static int buf2hexstr_sep(char *str, size_t str_n, size_t *strlength, *q = CH_ZERO; #ifdef CHARSET_EBCDIC - ebcdic2ascii(str, str, q - str - 1); + ebcdic2ascii(str, str, q - str); #endif return 1; }