Browse Source

Fix off by one issue in buf2hexstr_sep()

Fixes #23363

Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23404)
shridhar kalavagunta 3 months ago
parent
commit
c5cc9c419a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      crypto/o_str.c

+ 1 - 1
crypto/o_str.c

@@ -247,7 +247,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;
 }