aboutsummaryrefslogtreecommitdiff
path: root/openssl/crypto/asn1/asn_mime.c
diff options
context:
space:
mode:
Diffstat (limited to 'openssl/crypto/asn1/asn_mime.c')
-rw-r--r--openssl/crypto/asn1/asn_mime.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/openssl/crypto/asn1/asn_mime.c b/openssl/crypto/asn1/asn_mime.c
index 54a704a96..13d003bce 100644
--- a/openssl/crypto/asn1/asn_mime.c
+++ b/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;