aboutsummaryrefslogtreecommitdiff
path: root/openssl/crypto/x509v3/v3_utl.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2015-04-20 23:05:23 +0200
committermarha <marha@users.sourceforge.net>2015-04-20 23:05:23 +0200
commit0f7871ff824bcf064db3ab6bdfe26645ba6c8087 (patch)
tree90d3d2b6112e083289c9cf68146852087814f6d3 /openssl/crypto/x509v3/v3_utl.c
parent934184bfecd402aae891b8740d788b486aa7269f (diff)
parent2a00e489122f6c4b525090dbdba2855a2ea2d519 (diff)
downloadvcxsrv-0f7871ff824bcf064db3ab6bdfe26645ba6c8087.tar.gz
vcxsrv-0f7871ff824bcf064db3ab6bdfe26645ba6c8087.tar.bz2
vcxsrv-0f7871ff824bcf064db3ab6bdfe26645ba6c8087.zip
Merge remote-tracking branch 'origin/released'
Conflicts: openssl/Makefile
Diffstat (limited to 'openssl/crypto/x509v3/v3_utl.c')
-rw-r--r--openssl/crypto/x509v3/v3_utl.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/openssl/crypto/x509v3/v3_utl.c b/openssl/crypto/x509v3/v3_utl.c
index f65323be0..ed6099e12 100644
--- a/openssl/crypto/x509v3/v3_utl.c
+++ b/openssl/crypto/x509v3/v3_utl.c
@@ -901,8 +901,13 @@ static int do_check_string(ASN1_STRING *a, int cmp_type, equal_fn equal,
int astrlen;
unsigned char *astr;
astrlen = ASN1_STRING_to_UTF8(&astr, a);
- if (astrlen < 0)
+ if (astrlen < 0) {
+ /*
+ * -1 could be an internal malloc failure or a decoding error from
+ * malformed input; we can't distinguish.
+ */
return -1;
+ }
rv = equal(astr, astrlen, (unsigned char *)b, blen, flags);
if (rv > 0 && peername)
*peername = BUF_strndup((char *)astr, astrlen);