2013-10-21 10:34:04 +00:00
|
|
|
Upstream fix:
|
|
|
|
http://dev.mutt.org/trac/ticket/3547
|
|
|
|
|
|
|
|
--- a/mutt_ssl_gnutls.c
|
|
|
|
+++ b/mutt_ssl_gnutls.c
|
|
|
|
@@ -440,6 +440,14 @@
|
2011-12-07 13:24:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
- ptr = (unsigned char *)strstr((char*)b64_data.data, CERT_SEP) + 1;
|
|
|
|
- ptr = (unsigned char *)strstr((char*)ptr, CERT_SEP);
|
2013-10-21 10:34:04 +00:00
|
|
|
+ /* find start of cert, skipping junk */
|
|
|
|
+ ptr = (unsigned char *)strstr((char*)b64_data.data, CERT_SEP);
|
|
|
|
+ if (!ptr)
|
2011-12-07 13:24:59 +00:00
|
|
|
+ {
|
|
|
|
+ gnutls_free(cert.data);
|
|
|
|
+ FREE (&b64_data_data);
|
|
|
|
+ return 0;
|
|
|
|
+ }
|
2013-10-21 10:34:04 +00:00
|
|
|
+ /* find start of next cert */
|
|
|
|
+ ptr = (unsigned char *)strstr((char*)ptr + 1, CERT_SEP);
|
2011-12-07 13:24:59 +00:00
|
|
|
|
|
|
|
b64_data.size = b64_data.size - (ptr - b64_data.data);
|