summaryrefslogtreecommitdiff
path: root/apps/s_cb.c
diff options
context:
space:
mode:
authorViktor Dukhovni <openssl-users@dukhovni.org>2016-03-16 23:58:58 -0400
committerViktor Dukhovni <openssl-users@dukhovni.org>2016-03-17 00:19:45 -0400
commitb5f40eb279e37c86d0634db5ffcc37517ea97694 (patch)
treef030bf9eea7e6e355be691b0b942542c07693961 /apps/s_cb.c
parent748f254657ab900c0de5e9e1843150c2df4c4bea (diff)
downloadopenssl-new-b5f40eb279e37c86d0634db5ffcc37517ea97694.tar.gz
Bugfix: Encode the requested length in s_cb.c:hexencode()
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'apps/s_cb.c')
-rw-r--r--apps/s_cb.c2
1 files changed, 1 insertions, 1 deletions
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];
}