From: Bernd Edlinger Date: Thu, 2 Feb 2017 12:36:10 +0000 (+0100) Subject: Fix a crash with malformed user notice policy numbers X-Git-Tag: OpenSSL_1_1_1-pre1~2476 X-Git-Url: https://git.openssl.org/?p=openssl.git;a=commitdiff_plain;h=fe4075f25962dbd302d856c11ac47adb84edc9ca;hp=83b4049ab75e9da1815e9c854a9297bca3d4af6b Fix a crash with malformed user notice policy numbers Reviewed-by: Rich Salz Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/2352) --- diff --git a/crypto/x509v3/v3_cpols.c b/crypto/x509v3/v3_cpols.c index a697338488..f717e132d4 100644 --- a/crypto/x509v3/v3_cpols.c +++ b/crypto/x509v3/v3_cpols.c @@ -345,10 +345,10 @@ static int nref_nos(STACK_OF(ASN1_INTEGER) *nnums, STACK_OF(CONF_VALUE) *nos) return 1; merr: + ASN1_INTEGER_free(aint); X509V3err(X509V3_F_NREF_NOS, ERR_R_MALLOC_FAILURE); err: - sk_ASN1_INTEGER_pop_free(nnums, ASN1_STRING_free); return 0; }