aboutsummaryrefslogtreecommitdiff
path: root/crypto/openssl/crypto/asn1/asn_mime.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/openssl/crypto/asn1/asn_mime.c')
-rw-r--r--crypto/openssl/crypto/asn1/asn_mime.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/openssl/crypto/asn1/asn_mime.c b/crypto/openssl/crypto/asn1/asn_mime.c
index 54a704a969ea..13d003bce3cd 100644
--- a/crypto/openssl/crypto/asn1/asn_mime.c
+++ b/crypto/openssl/crypto/asn1/asn_mime.c
@@ -667,6 +667,8 @@ static STACK_OF(MIME_HEADER) *mime_parse_hdr(BIO *bio)
int len, state, save_state = 0;
headers = sk_MIME_HEADER_new(mime_hdr_cmp);
+ if (!headers)
+ return NULL;
while ((len = BIO_gets(bio, linebuf, MAX_SMLEN)) > 0) {
/* If whitespace at line start then continuation line */
if(mhdr && isspace((unsigned char)linebuf[0])) state = MIME_NAME;