Bugfix: Encode the requested length in s_cb.c:hexencode()

Reviewed-by: Rich Salz <rsalz@openssl.org>
This commit is contained in:
Viktor Dukhovni 2016-03-16 23:58:58 -04:00
parent 748f254657
commit b5f40eb279

View File

@ -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];
}