summaryrefslogtreecommitdiffstats
path: root/crypto
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:51:24 +0100
commitd44aa28b0db3ba355fe68c5971c90c9a1414788f (patch)
treec2030d63e32486b69f5c8accdf5607d42f37788d /crypto
parent1dea252221624542ca258231e5dc4c8bb528a97b (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) (cherry picked from commit c5cc9c419a0a8d97a44f01f95f0e213f56da4574)
Diffstat (limited to 'crypto')
-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 7fa487dd5f..bfbc2ca5e3 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;
}