1 |
wellsi |
1.1 |
diff -up openssl-fips-0.9.8e/crypto/pkcs7/pk7_mime.c.bad-mime openssl-fips-0.9.8e/crypto/pkcs7/pk7_mime.c |
2 |
|
|
--- openssl-fips-0.9.8e/crypto/pkcs7/pk7_mime.c.bad-mime 2007-06-22 14:17:50.000000000 +0200 |
3 |
|
|
+++ openssl-fips-0.9.8e/crypto/pkcs7/pk7_mime.c 2009-04-15 14:58:36.000000000 +0200 |
4 |
|
|
@@ -689,6 +689,10 @@ static int mime_hdr_addparam(MIME_HEADER |
5 |
|
|
static int mime_hdr_cmp(const MIME_HEADER * const *a, |
6 |
|
|
const MIME_HEADER * const *b) |
7 |
|
|
{ |
8 |
|
|
+ if ((*a)->name == NULL || (*b)->name == NULL) |
9 |
|
|
+ return (*a)->name - (*b)->name < 0 ? -1 : |
10 |
|
|
+ (*a)->name - (*b)->name > 0 ? 1 : 0; |
11 |
|
|
+ |
12 |
|
|
return(strcmp((*a)->name, (*b)->name)); |
13 |
|
|
} |
14 |
|
|
|