rpms/mutt/devel mutt-1.5.18-imap.patch, NONE, 1.1 mutt-1.5.18-intr.patch, NONE, 1.1 mutt.spec, 1.54, 1.55

Miroslav Lichvar (mlichvar) fedora-extras-commits at redhat.com
Mon Jun 2 10:45:17 UTC 2008


Author: mlichvar

Update of /cvs/pkgs/rpms/mutt/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv11724

Modified Files:
	mutt.spec 
Added Files:
	mutt-1.5.18-imap.patch mutt-1.5.18-intr.patch 
Log Message:
- allow interrupts when reading, writing or closing sockets (#447887)
- fix possible crash when opening IMAP mailbox


mutt-1.5.18-imap.patch:

--- NEW FILE mutt-1.5.18-imap.patch ---
# HG changeset patch
# User Rocco Rutte <pdmef at gmx.net>
# Date 1211437223 25200
# Branch HEAD
# Node ID bba92e40144004664f0ff20dddc82d253f5a656d
# Parent  51c494a2e735c8f6a8338b26d932b54c5d8a9a7d
Guard idata->mailbox read in imap_mailbox_state. Closes #3057.

diff -r 51c494a2e735 -r bba92e401440 imap/browse.c
--- a/imap/browse.c	Wed May 21 22:59:22 2008 -0700
+++ b/imap/browse.c	Wed May 21 23:20:23 2008 -0700
@@ -228,7 +228,7 @@ int imap_mailbox_state (const char* path
     return -1;
   }
 
-  if (!imap_mxcmp(mx.mbox, idata->mailbox))
+  if (idata->ctx && !imap_mxcmp(mx.mbox, idata->mailbox))
   {
     state->new = idata->ctx->new;
     state->messages = idata->ctx->msgcount;

mutt-1.5.18-intr.patch:

--- NEW FILE mutt-1.5.18-intr.patch ---
diff -up mutt-1.5.18/mutt_socket.c.intr mutt-1.5.18/mutt_socket.c
--- mutt-1.5.18/mutt_socket.c.intr	2008-01-28 03:20:23.000000000 +0100
+++ mutt-1.5.18/mutt_socket.c	2008-05-22 16:49:04.000000000 +0200
@@ -75,10 +75,12 @@ int mutt_socket_close (CONNECTION* conn)
 {
   int rc = -1;
 
+  mutt_allow_interrupt (1);
   if (conn->fd < 0)
     dprint (1, (debugfile, "mutt_socket_close: Attempt to close closed connection.\n"));
   else
     rc = conn->conn_close (conn);
+  mutt_allow_interrupt (0);
 
   conn->fd = -1;
   conn->ssf = 0;
@@ -96,7 +98,9 @@ int mutt_socket_read (CONNECTION* conn, 
     return -1;
   }
 
+  mutt_allow_interrupt (1);
   rc = conn->conn_read (conn, buf, len);
+  mutt_allow_interrupt (0);
   /* EOF */
   if (rc == 0)
   {
@@ -123,14 +127,17 @@ int mutt_socket_write_d (CONNECTION *con
 
   if (len < 0)
     len = mutt_strlen (buf);
+  mutt_allow_interrupt (1);
   if ((rc = conn->conn_write (conn, buf, len)) < 0)
   {
+    mutt_allow_interrupt (0);
     dprint (1, (debugfile,
       "mutt_socket_write: error writing, closing socket\n"));
     mutt_socket_close (conn);
 
     return -1;
   }
+  mutt_allow_interrupt (0);
 
   if (rc < len)
   {
@@ -161,9 +168,11 @@ int mutt_socket_readchar (CONNECTION *co
 {
   if (conn->bufpos >= conn->available)
   {
-    if (conn->fd >= 0)
+    if (conn->fd >= 0) {
+      mutt_allow_interrupt (1);
       conn->available = conn->conn_read (conn, conn->inbuf, sizeof (conn->inbuf));
-    else
+      mutt_allow_interrupt (0);
+    } else
     {
       dprint (1, (debugfile, "mutt_socket_readchar: attempt to read from closed connection.\n"));
       return -1;


Index: mutt.spec
===================================================================
RCS file: /cvs/pkgs/rpms/mutt/devel/mutt.spec,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -r1.54 -r1.55
--- mutt.spec	19 May 2008 10:50:48 -0000	1.54
+++ mutt.spec	2 Jun 2008 10:44:32 -0000	1.55
@@ -15,7 +15,7 @@
 Summary: A text mode mail user agent
 Name: mutt
 Version: 1.5.18
-Release: 1%{?dist}
+Release: 2%{?dist}
 Epoch: 5
 # The entire source code is GPLv2+ except
 # pgpewrap.c setenv.c sha1.c wcwidth.c which are Public Domain
@@ -26,6 +26,8 @@
 Patch2: mutt-1.5.13-nodotlock.patch
 Patch3: mutt-1.5.18-muttrc.patch
 Patch4: mutt-1.5.18-manual.patch
+Patch5: mutt-1.5.18-intr.patch
+Patch6: mutt-1.5.18-imap.patch
 Url: http://www.mutt.org/
 Requires: mailcap urlview
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -63,6 +65,8 @@
 %patch2 -p1 -b .nodl
 %patch3 -p1 -b .muttrc
 %patch4 -p1 -b .manual
+%patch5 -p1 -b .intr
+%patch6 -p1 -b .imap
 
 install -p -m644 %{SOURCE1} mutt_ldap_query
 
@@ -137,6 +141,10 @@
 %{_mandir}/man5/muttrc.*
 
 %changelog
+* Mon Jun 02 2008 Miroslav Lichvar <mlichvar at redhat.com> 5:1.5.18-2
+- allow interrupts when reading, writing or closing sockets (#447887)
+- fix possible crash when opening IMAP mailbox
+
 * Mon May 19 2008 Miroslav Lichvar <mlichvar at redhat.com> 5:1.5.18-1
 - update to 1.5.18
 




More information about the fedora-extras-commits mailing list