summaryrefslogtreecommitdiffstats
path: root/lib/libssl/src
diff options
context:
space:
mode:
authormiod <miod@openbsd.org>2015-07-20 15:41:48 +0000
committermiod <miod@openbsd.org>2015-07-20 15:41:48 +0000
commit50a35c747198a71e67be9d9f176004f30ee459d7 (patch)
treee119bca8dbb7535c81803f63d2846ca41b1ec7ed /lib/libssl/src
parentBetter desciption of Unix domain socket forwarding. (diff)
downloadwireguard-openbsd-50a35c747198a71e67be9d9f176004f30ee459d7.tar.xz
wireguard-openbsd-50a35c747198a71e67be9d9f176004f30ee459d7.zip
Check the return value of asn1_enc_save(). ok bcook@ doug@
Diffstat (limited to 'lib/libssl/src')
-rw-r--r--lib/libssl/src/crypto/asn1/tasn_dec.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libssl/src/crypto/asn1/tasn_dec.c b/lib/libssl/src/crypto/asn1/tasn_dec.c
index 7d61a6a2338..f08514dc832 100644
--- a/lib/libssl/src/crypto/asn1/tasn_dec.c
+++ b/lib/libssl/src/crypto/asn1/tasn_dec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tasn_dec.c,v 1.26 2015/03/19 14:00:22 tedu Exp $ */
+/* $OpenBSD: tasn_dec.c,v 1.27 2015/07/20 15:41:48 miod Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 2000.
*/
@@ -431,8 +431,10 @@ ASN1_item_ex_d2i(ASN1_VALUE **pval, const unsigned char **in, long len,
}
}
/* Save encoding */
- if (!asn1_enc_save(pval, *in, p - *in, it))
+ if (!asn1_enc_save(pval, *in, p - *in, it)) {
+ ASN1err(ASN1_F_ASN1_ITEM_EX_D2I, ERR_R_MALLOC_FAILURE);
goto auxerr;
+ }
*in = p;
if (asn1_cb && !asn1_cb(ASN1_OP_D2I_POST, pval, it, NULL))
goto auxerr;