<<< Date Index >>>     <<< Thread Index >>>

Re: imap/2182: segFault on imaps folder change with mailboxes=.



The following reply was made to PR imap/2182; it has been noted by GNATS.

From: Paul Walker <paul@xxxxxxxxxxxxxxxxxxxxx>
To: bug-any@xxxxxxxxxxxxx
Cc: 
Subject: Re: imap/2182: segFault on imaps folder change with mailboxes=.
Date: Sun, 2 Apr 2006 23:53:22 +0100

 --BRE3mIcgqKzpedwo
 Content-Type: multipart/mixed; boundary="hOcCNbCCxyk/YU74"
 Content-Disposition: inline
 
 
 --hOcCNbCCxyk/YU74
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 Content-Transfer-Encoding: quoted-printable
 
 On Fri, Mar 31, 2006 at 08:35:01PM +0200, Nils Radtke wrote:
 
 >   thanks for your reply! :)
 
 Bit late, but better than never. ;-)
 
 >  #  I can reproduce the crash with "mailboxes =3D .", but it doesn't happ=
 en
 >  # with "mailboxes ." :) It shouldn't crash, so that'll probably get
 >  Sorry, this happend some time ago when I posted it. Now it's too far
 >  away. I can't hardly remember whether I really typed the "=3D" or just
 >  wrote it in my report to stress the dot. ;)
 
 I've attached a patch to fix the crash I found with what you posted. Could
 you let us know whether you still see the problem? If not, do you have any
 objections to the bug being closed?
 
 Thanks,
 
 --=20
 Paul
 
 Montgomery Scott was a drunken sot who was very rarely stable,
 Captain Kirk went a bit berserk with a hip flask and a ladle,=20
 Data calmed on a keyboard armed with hallucinogenic cable,
 Mr. Spock, of Vulcan stock, could drink you under the table... -- Rich Chur=
 cher
 
 --hOcCNbCCxyk/YU74
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: attachment; filename="imapcore.patch"
 Content-Transfer-Encoding: quoted-printable
 
 diff -r f0b15c6e1d57 imap/command.c
 --- a/imap/command.c   Thu Mar 30 19:50:45 2006 +0000
 +++ b/imap/command.c   Sun Apr  2 23:49:26 2006 +0100
 @@ -831,6 +831,15 @@ static void cmd_parse_status (IMAP_DATA*
        continue;
      }
      /* dprint (2, (debugfile, "Buffy entry: [%s] mbox: [%s]\n", inc->path,=
  NONULL(mx.mbox))); */
 +
 +    /* mx.mbox can be NULL if  the user gives us a mailboxes string which =
 gets
 +     * substituted away - for example, "mailboxes =3D" will do it quite ni=
 cely.
 +     * Catch this, rather than crashing. */
 +    if (mx.mbox =3D=3D NULL)
 +    {
 +      dprint (2, (debugfile, "Buffy entry: [%s] - mbox is NULL, skipping\n=
 ", inc->path));
 +      continue;
 +    }
     =20
      if (mutt_account_match (&idata->conn->account, &mx.account))
      {
 
 --hOcCNbCCxyk/YU74--
 
 --BRE3mIcgqKzpedwo
 Content-Type: application/pgp-signature; name="signature.asc"
 Content-Description: Digital signature
 Content-Disposition: inline
 
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.1 (GNU/Linux)
 
 iD8DBQFEMFXiP9fOqdxRstoRAtrIAKCC0rRa9SMZQt4A1PqmXKaycgrVjQCgo3Ky
 aoXYfof6udNzNax7fpnFM/U=
 =IFbk
 -----END PGP SIGNATURE-----
 
 --BRE3mIcgqKzpedwo--