projects
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2b201c5
)
Ensure the mime_hdr_free function can handle NULLs
author
Matt Caswell
<matt@openssl.org>
Mon, 22 Aug 2016 21:27:27 +0000
(22:27 +0100)
committer
Matt Caswell
<matt@openssl.org>
Mon, 22 Aug 2016 23:19:15 +0000
(
00:19
+0100)
Sometimes it is called with a NULL pointer
Reviewed-by: Tim Hudson <tjh@openssl.org>
crypto/asn1/asn_mime.c
patch
|
blob
|
history
diff --git
a/crypto/asn1/asn_mime.c
b/crypto/asn1/asn_mime.c
index a4527a160ac024ccbd5c0f4eaea21f11d22f2cb5..d7ec801b1e779948f98cd4660402f5a085b475ab 100644
(file)
--- a/
crypto/asn1/asn_mime.c
+++ b/
crypto/asn1/asn_mime.c
@@
-918,6
+918,8
@@
static MIME_PARAM *mime_param_find(MIME_HEADER *hdr, const char *name)
static void mime_hdr_free(MIME_HEADER *hdr)
{
+ if (hdr == NULL)
+ return;
OPENSSL_free(hdr->name);
OPENSSL_free(hdr->value);
if (hdr->params)