projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4a8362a
)
PR: 2711
author
Dr. Stephen Henson
<steve@openssl.org>
Thu, 23 Feb 2012 21:50:23 +0000
(21:50 +0000)
committer
Dr. Stephen Henson
<steve@openssl.org>
Thu, 23 Feb 2012 21:50:23 +0000
(21:50 +0000)
Submitted by: Tomas Mraz <tmraz@redhat.com>
Tolerate bad MIME headers in parser.
crypto/asn1/asn_mime.c
patch
|
blob
|
history
diff --git
a/crypto/asn1/asn_mime.c
b/crypto/asn1/asn_mime.c
index bbc4952918debe43691c2dfa53965083e61bd50c..dc2a35d0c8cdb38f5c1301a74551ed653ce7b921 100644
(file)
--- a/
crypto/asn1/asn_mime.c
+++ b/
crypto/asn1/asn_mime.c
@@
-858,6
+858,10
@@
static int mime_hdr_addparam(MIME_HEADER *mhdr, char *name, char *value)
static int mime_hdr_cmp(const MIME_HEADER * const *a,
const MIME_HEADER * const *b)
{
+ if ((*a)->name == NULL || (*b)->name == NULL)
+ return (*a)->name - (*b)->name < 0 ? -1 :
+ (*a)->name - (*b)->name > 0 ? 1 : 0;
+
return(strcmp((*a)->name, (*b)->name));
}