Fixed segmentation fault during messages removal in thread mode (rhbz#674271)

This commit is contained in:
Honza Horák 2011-11-02 13:13:46 +01:00
parent cee76c5580
commit a8fbf38146
2 changed files with 23 additions and 0 deletions

19
mutt-1.5.21-pophash.patch Normal file
View File

@ -0,0 +1,19 @@
diff -up mutt/pop.c.pophash mutt/pop.c
--- mutt/pop.c.pophash 2009-12-14 19:24:59.000000000 +0100
+++ mutt/pop.c 2011-10-04 16:51:23.307236908 +0200
@@ -618,8 +618,15 @@ int pop_fetch_message (MESSAGE* msg, CON
}
rewind (msg->fp);
uidl = h->data;
+
+ /* we replace envelop, key in subj_hash has to be updated as well */
+ if (ctx->subj_hash && h->env->real_subj)
+ hash_delete (ctx->subj_hash, h->env->real_subj, h, NULL);
mutt_free_envelope (&h->env);
h->env = mutt_read_rfc822_header (msg->fp, h, 0, 0);
+ if (ctx->subj_hash && h->env->real_subj)
+ hash_insert (ctx->subj_hash, h->env->real_subj, h, 1);
+
h->data = uidl;
h->lines = 0;
fgets (buf, sizeof (buf), msg->fp);

View File

@ -32,6 +32,7 @@ Patch6: mutt-1.5.21-hdrcnt.patch
Patch7: mutt-1.5.21-testcert.patch
Patch8: mutt-1.5.21-cabundle.patch
Patch9: mutt-1.5.21-gpgme-1.2.0.patch
Patch10: mutt-1.5.21-pophash.patch
Url: http://www.mutt.org/
Requires: mailcap urlview
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -76,6 +77,7 @@ for selecting groups of messages.
%patch7 -p1 -b .testcert
%patch8 -p1 -b .cabundle
%patch9 -p1 -b .gpgme-1.2.0
%patch10 -p1 -b .pophash
sed -i.gpgerror 's/`$GPGME_CONFIG --libs`/"\0 -lgpg-error"/' configure
@ -161,6 +163,8 @@ rm -rf $RPM_BUILD_ROOT
* Thu Oct 27 2011 Honza Horak <hhorak@redhat.com> - 5:1.5.21-7
- Removed ca-bundle.crt since it is outdated (rhbz#734379)
- Build with gpgme support by default (rhbz#748337)
- Fixed segmentation fault during messages removal in thread mode
(rhbz#674271)
* Wed Jun 29 2011 Honza Horak <hhorak@redhat.com> - 5:1.5.21-6
- Fixed message indexes when skipping fetch response (mutt bug #3288)