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.0.14~88 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d44aa28b0db3ba355fe68c5971c90c9a1414788f;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 7fa487dd5fc..bfbc2ca5e37 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; }