diff options
author | 2014-10-12 20:47:12 +0000 | |
---|---|---|
committer | 2014-10-12 20:47:12 +0000 | |
commit | 63f99b2ed4cd9e89817dc105b58da849ad1185c5 (patch) | |
tree | b39084721e51596cb3ec862ce43b4789c4c76474 /lib/libssl/src | |
parent | Recognize, and ignore, -fstack-shuffle, in gcc 3, so that it may be used in (diff) | |
download | wireguard-openbsd-63f99b2ed4cd9e89817dc105b58da849ad1185c5.tar.xz wireguard-openbsd-63f99b2ed4cd9e89817dc105b58da849ad1185c5.zip |
Paranoia: in ASN1_mbstring_ncopy(), check for len < 0 instead of len == -1,
in order to catch all negative sizes.
Diffstat (limited to 'lib/libssl/src')
-rw-r--r-- | lib/libssl/src/crypto/asn1/a_mbstr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libssl/src/crypto/asn1/a_mbstr.c b/lib/libssl/src/crypto/asn1/a_mbstr.c index 985d29824da..9ce0a000feb 100644 --- a/lib/libssl/src/crypto/asn1/a_mbstr.c +++ b/lib/libssl/src/crypto/asn1/a_mbstr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: a_mbstr.c,v 1.20 2014/09/21 12:14:34 miod Exp $ */ +/* $OpenBSD: a_mbstr.c,v 1.21 2014/10/12 20:47:12 miod Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 1999. */ @@ -104,7 +104,7 @@ ASN1_mbstring_ncopy(ASN1_STRING **out, const unsigned char *in, int len, int nchar; int (*cpyfunc)(unsigned long, void *) = NULL; - if (len == -1) + if (len < 0) len = strlen((const char *)in); if (!mask) mask = DIRSTRING_TYPE; |