summaryrefslogtreecommitdiffstats
path: root/lib/libssl/src
diff options
context:
space:
mode:
authormiod <miod@openbsd.org>2014-04-17 19:33:42 +0000
committermiod <miod@openbsd.org>2014-04-17 19:33:42 +0000
commita5efc3bbda19d0f8185e190dcc7a7baedf8b80fe (patch)
treec1caffbabc31ee21c49ae96b08cb18ced732fdc8 /lib/libssl/src
parentI'm just trying to improve the code... (diff)
downloadwireguard-openbsd-a5efc3bbda19d0f8185e190dcc7a7baedf8b80fe.tar.xz
wireguard-openbsd-a5efc3bbda19d0f8185e190dcc7a7baedf8b80fe.zip
sprintf: bad.
snprintf: good. snprintf with a correct size: better! (harmless in this case)
Diffstat (limited to 'lib/libssl/src')
-rw-r--r--lib/libssl/src/crypto/asn1/a_strex.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libssl/src/crypto/asn1/a_strex.c b/lib/libssl/src/crypto/asn1/a_strex.c
index 713b3cb028e..65f95532a33 100644
--- a/lib/libssl/src/crypto/asn1/a_strex.c
+++ b/lib/libssl/src/crypto/asn1/a_strex.c
@@ -149,7 +149,7 @@ static int do_esc_char(unsigned long c, unsigned char flags, char *do_quotes, ch
return 2;
}
if(chflgs & (ASN1_STRFLGS_ESC_CTRL|ASN1_STRFLGS_ESC_MSB)) {
- (void) snprintf(tmphex, 11, "\\%02X", chtmp);
+ (void) snprintf(tmphex, sizeof tmphex, "\\%02X", chtmp);
if(!io_ch(arg, tmphex, 3)) return -1;
return 3;
}