diff options
author | miod <> | 2014-07-11 13:41:59 +0000 |
---|---|---|
committer | miod <> | 2014-07-11 13:41:59 +0000 |
commit | 9b099cfe9b8ff48ebf73f26baf1ffb356d3ab825 (patch) | |
tree | 65ce624e7f28ec877580f132bc7d476d3991df23 /src/lib/libcrypto/asn1/asn_mime.c | |
parent | 348e81746631673e88ea126c2a95493cd916977a (diff) | |
download | openbsd-9b099cfe9b8ff48ebf73f26baf1ffb356d3ab825.tar.gz openbsd-9b099cfe9b8ff48ebf73f26baf1ffb356d3ab825.tar.bz2 openbsd-9b099cfe9b8ff48ebf73f26baf1ffb356d3ab825.zip |
More memory leaks and unchecked allocations; OpenSSL PR #3403 via OpenSSL
trunk. (note we had already fixed some of the issues in that PR independently)
Diffstat (limited to 'src/lib/libcrypto/asn1/asn_mime.c')
-rw-r--r-- | src/lib/libcrypto/asn1/asn_mime.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/libcrypto/asn1/asn_mime.c b/src/lib/libcrypto/asn1/asn_mime.c index 41b39efa7b..994531837f 100644 --- a/src/lib/libcrypto/asn1/asn_mime.c +++ b/src/lib/libcrypto/asn1/asn_mime.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: asn_mime.c,v 1.20 2014/07/11 08:44:47 jsing Exp $ */ | 1 | /* $OpenBSD: asn_mime.c,v 1.21 2014/07/11 13:41:59 miod Exp $ */ |
2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
3 | * project. | 3 | * project. |
4 | */ | 4 | */ |
@@ -675,6 +675,8 @@ STACK_OF(MIME_HEADER) *mime_parse_hdr(BIO *bio) | |||
675 | int len, state, save_state = 0; | 675 | int len, state, save_state = 0; |
676 | 676 | ||
677 | headers = sk_MIME_HEADER_new(mime_hdr_cmp); | 677 | headers = sk_MIME_HEADER_new(mime_hdr_cmp); |
678 | if (!headers) | ||
679 | return NULL; | ||
678 | while ((len = BIO_gets(bio, linebuf, MAX_SMLEN)) > 0) { | 680 | while ((len = BIO_gets(bio, linebuf, MAX_SMLEN)) > 0) { |
679 | /* If whitespace at line start then continuation line */ | 681 | /* If whitespace at line start then continuation line */ |
680 | if (mhdr && isspace((unsigned char)linebuf[0])) | 682 | if (mhdr && isspace((unsigned char)linebuf[0])) |