From: Viktor Dukhovni Date: Thu, 17 Mar 2016 03:58:58 +0000 (-0400) Subject: Bugfix: Encode the requested length in s_cb.c:hexencode() X-Git-Tag: OpenSSL_1_1_0-pre5~348 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=b5f40eb279e37c86d0634db5ffcc37517ea97694;p=oweals%2Fopenssl.git Bugfix: Encode the requested length in s_cb.c:hexencode() Reviewed-by: Rich Salz --- diff --git a/apps/s_cb.c b/apps/s_cb.c index 047f2cec8b..66b2a50dde 100644 --- a/apps/s_cb.c +++ b/apps/s_cb.c @@ -1106,7 +1106,7 @@ static char *hexencode(const unsigned char *data, size_t len) } cp = out = app_malloc(ilen, "TLSA hex data buffer"); - while (ilen-- > 0) { + while (len-- > 0) { *cp++ = hex[(*data >> 4) & 0x0f]; *cp++ = hex[*data++ & 0x0f]; }