Submitted by: Tomas Mraz <tmraz@redhat.com>

Tolerate bad MIME headers in parser.
This commit is contained in:
Dr. Stephen Henson 2012-02-23 21:50:44 +00:00
parent ef570cc869
commit 6941b7b918

View File

@ -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));
}