Fix patch for #750929

Resolves: #957542
This commit is contained in:
Honza Horák 2013-05-29 14:34:28 +02:00
parent 8d155fb1f5
commit 875f9ad500
2 changed files with 7 additions and 3 deletions

View File

@ -7,7 +7,7 @@ diff -up mutt-1.5.21/mutt_ssl_gnutls.c.debug mutt-1.5.21/mutt_ssl_gnutls.c
- ptr = (unsigned char *)strstr((char*)b64_data.data, CERT_SEP) + 1; - ptr = (unsigned char *)strstr((char*)b64_data.data, CERT_SEP) + 1;
- ptr = (unsigned char *)strstr((char*)ptr, CERT_SEP); - ptr = (unsigned char *)strstr((char*)ptr, CERT_SEP);
+ ptr = (unsigned char *)memmem((char*)b64_data.data, b64_data.size, CERT_SEP, sizeof(CERT_SEP)); + ptr = (unsigned char *)memmem((char*)b64_data.data, b64_data.size, CERT_SEP, sizeof(CERT_SEP-1));
+ if (ptr == NULL) + if (ptr == NULL)
+ { + {
+ gnutls_free(cert.data); + gnutls_free(cert.data);
@ -16,6 +16,6 @@ diff -up mutt-1.5.21/mutt_ssl_gnutls.c.debug mutt-1.5.21/mutt_ssl_gnutls.c
+ } + }
+ ptr += 1; + ptr += 1;
+ ptr = (unsigned char *)memmem((char*)ptr, b64_data.size - (ptr - b64_data.data), CERT_SEP, sizeof(CERT_SEP)); + ptr = (unsigned char *)memmem((char*)ptr, b64_data.size - (ptr - b64_data.data), CERT_SEP, sizeof(CERT_SEP-1));
b64_data.size = b64_data.size - (ptr - b64_data.data); b64_data.size = b64_data.size - (ptr - b64_data.data);
b64_data.data = ptr; b64_data.data = ptr;

View File

@ -16,7 +16,7 @@
Summary: A text mode mail user agent Summary: A text mode mail user agent
Name: mutt Name: mutt
Version: 1.5.21 Version: 1.5.21
Release: 19%{?dist} Release: 20%{?dist}
Epoch: 5 Epoch: 5
# The entire source code is GPLv2+ except # The entire source code is GPLv2+ except
# pgpewrap.c setenv.c sha1.c wcwidth.c which are Public Domain # pgpewrap.c setenv.c sha1.c wcwidth.c which are Public Domain
@ -177,6 +177,10 @@ ln -sf ./muttrc.5 $RPM_BUILD_ROOT%{_mandir}/man5/muttrc.local.5
%{_mandir}/man5/muttrc.* %{_mandir}/man5/muttrc.*
%changelog %changelog
* Wed May 29 2013 Honza Horak <hhorak@redhat.com> - 5:1.5.21-20
- Fix patch for #750929
Resolves: #957542
* Mon May 20 2013 Honza Horak <hhorak@redhat.com> - 5:1.5.21-19 * Mon May 20 2013 Honza Horak <hhorak@redhat.com> - 5:1.5.21-19
- Fix missing options in doc and pgpring, pgpewrap man page - Fix missing options in doc and pgpring, pgpewrap man page