summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorshridhar kalavagunta <coolshrid@hotmail.com>2024-01-26 21:10:32 -0600
committerTomas Mraz <tomas@openssl.org>2024-03-01 10:50:01 +0100
commitc5cc9c419a0a8d97a44f01f95f0e213f56da4574 (patch)
tree6c3a7590cc1da26493d9680fec6859e123f8e2b8
parent2d70cc9cecf8b322d795985efecee06242b203b3 (diff)
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)
-rw-r--r--crypto/o_str.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/o_str.c b/crypto/o_str.c
index f1aacda5e3..ce60f3b95c 100644
--- a/crypto/o_str.c
+++ b/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;
}