Hello community,

here is the log from the commit of package mutt for openSUSE:Factory checked in 
at 2015-01-27 09:09:21
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/mutt (Old)
 and      /work/SRC/openSUSE:Factory/.mutt.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "mutt"

Changes:
--------
--- /work/SRC/openSUSE:Factory/mutt/mutt.changes        2014-12-16 
14:47:30.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.mutt.new/mutt.changes   2015-01-27 
09:09:25.000000000 +0100
@@ -1,0 +2,16 @@
+Mon Jan 26 16:22:08 UTC 2015 - [email protected]
+
+- Update to mutt version 1.5.23 which is a security bugfix release
+  as well as add support for TLS 1.1/1.2
+- Remove the patches automake-1.12.patch,
+  mutt-1.5.20-gpgme_set_locale.patch, and mutt-CVE-2014-0467.patch
+- Replace the patches
+  patch-1.5.23.rr.compressed.bz2 with patch-1.5.21.rr.compressed.1.bz2
+  mutt-1.5.21.sidebar.20120829.patch with patch-1.5.23.sidebar.20140412.patch
+  patch-1.5.5.1.nt.xtitles.3.ab.1 with patch-1.5.23.xtitles.patch
+  mutt-1.5.21.dif with mutt-1.5.23.dif
+- Modify the patches aw.listreply.diff, bug-676388-largefile.patch,
+  and bsc907453-CVE-2014-9116-jessie.patch
+- Build with PIE
+
+-------------------------------------------------------------------

Old:
----
  automake-1.12.patch
  mutt-1.5.20-gpgme_set_locale.patch
  mutt-1.5.21-cariage-return.path
  mutt-1.5.21-patches.tar.bz2
  mutt-1.5.21.dif
  mutt-1.5.21.sidebar.20120829.patch
  mutt-1.5.21.tar.bz2
  mutt-CVE-2014-0467.patch
  patch-1.5.21.rr.compressed.1.bz2
  patch-1.5.5.1.nt.xtitles.3.ab.1

New:
----
  mutt-1.5.23-cariage-return.path
  mutt-1.5.23-patches.tar.bz2
  mutt-1.5.23.dif
  mutt-1.5.23.tar.gz
  patch-1.5.23.rr.compressed.bz2
  patch-1.5.23.sidebar.20140412.patch
  patch-1.5.23.xtitles.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ mutt.spec ++++++
--- /var/tmp/diff_new_pack.qN4w5s/_old  2015-01-27 09:09:27.000000000 +0100
+++ /var/tmp/diff_new_pack.qN4w5s/_new  2015-01-27 09:09:27.000000000 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package mutt
 #
-# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -57,6 +57,7 @@
 Provides:       muttssl
 Obsoletes:      muttssl
 Recommends:     smtp_daemon
+Recommends:     urlview
 Recommends:     w3m
 %if 0%{?suse_version} > 1130
 Requires(post):   shared-mime-info
@@ -65,13 +66,13 @@
 # NOTE: We don't want this dependency and desktop-data-SuSE is in all
 # desktop selections.
 #Requires:    desktop-data-SuSE
-Version:        1.5.21
+Version:        1.5.23
 Release:        33.2
 Summary:        Mail Program
 License:        GPL-2.0+
 Group:          Productivity/Networking/Email/Clients
 # ftp://ftp.mutt.org/mutt/devel/
-Source0:        %name-%version.tar.bz2
+Source0:        https://bitbucket.org/mutt/mutt/downloads/%name-%version.tar.gz
 Source1:        Signature_conversion
 Source2:        README.alternates
 Source3:        mutt.png
@@ -83,28 +84,24 @@
 Source9:        mutt.mailcap
 Patch:          %name-%version.dif
 # http://www.spinnaker.de/mutt/compressed/
-Patch1:         patch-%version.rr.compressed.1.bz2
+Patch1:         patch-%version.rr.compressed.bz2
 Patch2:         %name-1.5.9i-pgpewrap.diff
 Patch3:         %name-1.5.20-sendgroupreplyto.diff
 Patch4:         %name-1.5.15-wrapcolumn.diff
-Patch5:         patch-1.5.5.1.nt.xtitles.3.ab.1
+Patch5:         patch-1.5.23.xtitles.patch
 # http://lunar-linux.org/mutt-sidebar
-Patch6:         mutt-1.5.21.sidebar.20120829.patch
+Patch6:         patch-1.5.23.sidebar.20140412.patch
 Patch7:         mutt-1.5.21-opennfs.dif
-Patch8:         mutt-1.5.20-gpgme_set_locale.patch
 Patch9:         bug-676388-largefile.patch
 Patch10:        mutt-1.5.21-tinfo.dif
 # http://www.wolfermann.org/mutt.html
 Patch11:        aw.listreply.diff
 Patch12:        patch-1.5.21.vk.pgp_verbose_mime
-Patch13:        automake-1.12.patch
 Patch14:        nion.sidebar-color.diff
 # PATCH-FIX-OPENSUSE: bnc#813498 - mutt crashes in fgetwc in 
text_enriched_handler
 Patch15:        widechar.sidebar.dif
 # PATCH-FIX-OPENSUSE: Be able to read signed/encrypted messsages even with CRLF
-Patch16:        mutt-1.5.21-cariage-return.path
-# PATCH-FIX-SUSE: bnc#868115 - CVE-2014-0467: mutt: crash due to malicious 
email
-Patch17:        mutt-CVE-2014-0467.patch
+Patch16:        mutt-1.5.23-cariage-return.path
 # PATCH-FIX-OPENSUSE bnc#899712 - fallback mailcap for e.g text/html
 Patch18:        mutt-1.5.21-mailcap.diff
 # PATCH-FIX-SUSE: bsc#907453 - CVE-2014-9116: mutt: heap-based buffer overflow 
in mutt_substrdup()
@@ -132,16 +129,13 @@
 %patch5 -p1 -b .xtitles
 %patch6 -p1 -b .sidebar
 %patch7 -p0 -b .opennfs
-%patch8 -p1 -b .gpgme
 %patch9 -p1 -b .largefile
 %patch10 -p0 -b .tinfo
 %patch11 -p1 -b .listreply
 %patch12 -p1 -b .pgp_verbose_mtime
-%patch13 -p1 -b .automake-1.12
 %patch14 -p1 -b .sidebar.color
 %patch15 -p0 -b .widechar.sidebar
 %patch16 -p0 -b .crlf
-%patch17 -p1 -b .cve.2014.0467
 %patch18 -p1 -b .mailcap
 %patch19 -p1 -b .cvw2014.9116
 
@@ -178,14 +172,15 @@
 CC=gcc
 CFLAGS="-Wall $RPM_OPT_FLAGS -I. -D_GNU_SOURCE"
 #cflags -DSUSE_IMAP_FORCE_SSL          CFLAGS
-cflags -std=gnu99                      CFLAGS
 cflags -fno-strict-aliasing            CFLAGS
 cflags -fstack-protector               CFLAGS
+cflags -fPIE                           CFLAGS
 cflags -g3                             CFLAGS
 cflags -pipe                           CFLAGS
 cflags -Wl,--as-needed                 LDFLAGS
 cflags -Wl,-O2                         LDFLAGS
 cflags -Wl,--hash-size=8599            LDFLAGS
+cflags -pie                            LDFLAGS
 KRB5CFGPATH=%{S:6}
 export CC CFLAGS LDFLAGS KRB5CFGPATH
 chmod 755 $KRB5CFGPATH
@@ -276,6 +271,7 @@
 %{_datadir}/applications/*.desktop
 %{_datadir}/pixmaps/mutt.png
 %{_mandir}/man1/mutt.1.gz
+%{_mandir}/man1/pgp*.1.gz
 %{_mandir}/man1/smime_keys.1.gz
 %{_mandir}/man5/mmdf_mutt.5.gz
 %{_mandir}/man5/muttrc.5.gz

++++++ aw.listreply.diff ++++++
--- /var/tmp/diff_new_pack.qN4w5s/_old  2015-01-27 09:09:27.000000000 +0100
+++ /var/tmp/diff_new_pack.qN4w5s/_new  2015-01-27 09:09:27.000000000 +0100
@@ -1,19 +1,21 @@
 ask when sending list message replies to author only - Armin Wolfermann (aw)
 
-Index: mutt-1.5.21/PATCHES
-===================================================================
---- mutt-1.5.21.orig/PATCHES   2012-06-21 11:48:06.757181997 +0200
-+++ mutt-1.5.21/PATCHES        2012-06-21 11:48:50.352837436 +0200
-@@ -1,3 +1,4 @@
+---
+ PATCHES |    1 +
+ init.h  |    7 +++++++
+ mutt.h  |    1 +
+ send.c  |   18 ++++++++++++++++++
+ 4 files changed, 27 insertions(+)
+
+--- mutt-1.5.23/PATCHES
++++ mutt-1.5.23/PATCHES        2015-01-26 15:34:40.133518493 +0000
+@@ -1,2 +1,3 @@
 +patch-1.5.9.aw.listreply.1
- patch-1.5.21.sidebar.20120829.txt
- patch-1.5.19.rr.compressed.1
- patch-1.5.5.1.nt.xtitles.3.ab.1
-Index: mutt-1.5.21/init.h
-===================================================================
---- mutt-1.5.21.orig/init.h    2012-06-21 11:48:06.754181952 +0200
-+++ mutt-1.5.21/init.h 2012-06-21 11:48:22.426417566 +0200
-@@ -1331,6 +1331,13 @@ struct option_t MuttVars[] = {
+ patch-1.5.23.sidebar.20140412.txt
+ rr.compressed
+--- mutt-1.5.23/init.h
++++ mutt-1.5.23/init.h 2012-06-21 09:48:22.000000000 +0000
+@@ -1340,6 +1340,13 @@ struct option_t MuttVars[] = {
    ** The locale used by \fCstrftime(3)\fP to format dates. Legal values are
    ** the strings your system accepts for the locale environment variable 
\fC$$$LC_TIME\fP.
    */
@@ -27,11 +29,9 @@
    { "mail_check",     DT_NUM,  R_NONE, UL &BuffyTimeout, 5 },
    /*
    ** .pp
-Index: mutt-1.5.21/mutt.h
-===================================================================
---- mutt-1.5.21.orig/mutt.h    2012-06-21 11:48:06.788182463 +0200
-+++ mutt-1.5.21/mutt.h 2012-06-21 11:48:22.426417566 +0200
-@@ -290,6 +290,7 @@ enum
+--- mutt-1.5.23/mutt.h
++++ mutt-1.5.23/mutt.h 2012-06-21 09:48:22.000000000 +0000
+@@ -288,6 +288,7 @@ enum
  #endif
    OPT_SUBJECT,
    OPT_VERIFYSIG,      /* verify PGP signatures */
@@ -39,11 +39,9 @@
      
    /* THIS MUST BE THE LAST VALUE. */
    OPT_MAX
-Index: mutt-1.5.21/send.c
-===================================================================
---- mutt-1.5.21.orig/send.c    2012-06-21 11:48:06.724181501 +0200
-+++ mutt-1.5.21/send.c 2012-06-21 11:48:22.426417566 +0200
-@@ -453,6 +453,7 @@ static int include_reply (CONTEXT *ctx,
+--- mutt-1.5.23/send.c
++++ mutt-1.5.23/send.c 2012-06-21 09:48:22.000000000 +0000
+@@ -452,6 +452,7 @@ static int include_reply (CONTEXT *ctx,
  static int default_to (ADDRESS **to, ENVELOPE *env, int flags, int hmfupto)
  {
    char prompt[STRING];
@@ -51,7 +49,7 @@
  
    if (flags && env->mail_followup_to && hmfupto == M_YES) 
    {
-@@ -466,6 +467,23 @@ static int default_to (ADDRESS **to, ENV
+@@ -465,6 +466,23 @@ static int default_to (ADDRESS **to, ENV
    if (flags & SENDLISTREPLY)
      return 0;
  

++++++ bsc907453-CVE-2014-9116-jessie.patch ++++++
--- /var/tmp/diff_new_pack.qN4w5s/_old  2015-01-27 09:09:27.000000000 +0100
+++ /var/tmp/diff_new_pack.qN4w5s/_new  2015-01-27 09:09:27.000000000 +0100
@@ -12,9 +12,13 @@
 
 Index: mutt/lib.c
 ===================================================================
+---
+ lib.c |    3 +++
+ 1 file changed, 3 insertions(+)
+
 --- mutt/lib.c
-+++ mutt/lib.c
-@@ -819,6 +819,9 @@ char *mutt_substrdup (const char *begin,
++++ mutt/lib.c 2015-01-26 00:00:00.000000000 +0000
+@@ -820,6 +820,9 @@ char *mutt_substrdup (const char *begin,
    size_t len;
    char *p;
  
@@ -24,20 +28,3 @@
    if (end)
      len = end - begin;
    else
-Index: mutt/sendlib.c
-===================================================================
---- mutt/sendlib.c
-+++ mutt/sendlib.c
-@@ -1814,7 +1814,11 @@ static int write_one_header (FILE *fp, i
-     {
-       tagbuf = mutt_substrdup (start, t);
-       ++t; /* skip over the colon separating the header field name and value 
*/
--      SKIPWS(t); /* skip over any leading whitespace */
-+
-+      /* skip over any leading whitespace (WSP, as defined in RFC5322) */
-+      while (*t == ' ' || *t == '\t') 
-+      t++;
-+
-       valbuf = mutt_substrdup (t, end);
-     }
-     dprint(4,(debugfile,"mwoh: buf[%s%s] too long, "

++++++ bug-676388-largefile.patch ++++++
--- /var/tmp/diff_new_pack.qN4w5s/_old  2015-01-27 09:09:27.000000000 +0100
+++ /var/tmp/diff_new_pack.qN4w5s/_new  2015-01-27 09:09:27.000000000 +0100
@@ -1,7 +1,12 @@
-diff -ur orig.010003/mutt-1.5.21/crypt-gpgme.c mutt-1.5.21/crypt-gpgme.c
---- orig.010003/mutt-1.5.21/crypt-gpgme.c      2010-09-13 19:19:55.000000000 
+0200
-+++ mutt-1.5.21/crypt-gpgme.c  2011-03-02 18:18:01.000000000 +0100
-@@ -461,7 +461,7 @@
+---
+ crypt-gpgme.c |    2 +-
+ mh.c          |    6 +++---
+ mutt.h        |    2 +-
+ 3 files changed, 5 insertions(+), 5 deletions(-)
+
+--- mutt-1.5.23/crypt-gpgme.c
++++ mutt-1.5.23/crypt-gpgme.c  2011-03-02 17:18:01.000000000 +0000
+@@ -450,7 +450,7 @@ static gpgme_data_t body_to_data_object
  /* Create a GPGME data object from the stream FP but limit the object
     to LENGTH bytes starting at OFFSET bytes from the beginning of the
     file. */
@@ -10,31 +15,9 @@
  {
    int err = 0;
    gpgme_data_t data;
-@@ -2156,7 +2156,7 @@
- {
-   int needpass = -1, pgp_keyblock = 0;
-   int clearsign = 0;
--  long start_pos = 0;
-+  LOFF_T start_pos = 0;
-   long bytes;
-   LOFF_T last_pos, offset;
-   char buf[HUGE_STRING];
-diff -ur orig.010003/mutt-1.5.21/handler.c mutt-1.5.21/handler.c
---- orig.010003/mutt-1.5.21/handler.c  2009-08-25 21:08:52.000000000 +0200
-+++ mutt-1.5.21/handler.c      2011-03-02 18:12:28.000000000 +0100
-@@ -1520,7 +1520,7 @@
-   FILE *fp = NULL;
-   char tempfile[_POSIX_PATH_MAX];
-   handler_t handler = NULL;
--  long tmpoffset = 0;
-+  LOFF_T tmpoffset = 0;
-   size_t tmplength = 0;
-   char type[STRING];
-   int rc = 0;
-diff -ur orig.010003/mutt-1.5.21/mh.c mutt-1.5.21/mh.c
---- orig.010003/mutt-1.5.21/mh.c       2010-08-24 18:34:21.000000000 +0200
-+++ mutt-1.5.21/mh.c   2011-03-02 18:48:36.000000000 +0100
-@@ -1493,9 +1493,9 @@
+--- mutt-1.5.23/mh.c
++++ mutt-1.5.23/mh.c   2011-03-02 17:48:36.000000000 +0000
+@@ -1579,9 +1579,9 @@ static int mh_rewrite_message (CONTEXT *
    char newpath[_POSIX_PATH_MAX];
    char partpath[_POSIX_PATH_MAX];
  
@@ -47,10 +30,9 @@
  
    if ((dest = mx_open_new_message (ctx, h, 0)) == NULL)
      return -1;
-diff -ur orig.010003/mutt-1.5.21/mutt.h mutt-1.5.21/mutt.h
---- orig.010003/mutt-1.5.21/mutt.h     2010-09-13 19:19:55.000000000 +0200
-+++ mutt-1.5.21/mutt.h 2011-03-02 17:52:03.000000000 +0100
-@@ -625,7 +625,7 @@
+--- mutt-1.5.23/mutt.h
++++ mutt-1.5.23/mutt.h 2011-03-02 16:52:03.000000000 +0000
+@@ -638,7 +638,7 @@ typedef struct body
    PARAMETER *parameter;         /* parameters of the content-type */
    char *description;            /* content-description */
    char *form_name;            /* Content-Disposition form-data name param */
@@ -59,45 +41,3 @@
                                 * this info is used when invoking metamail,
                                 * where we need to send the headers of the
                                 * attachment
-diff -ur orig.010003/mutt-1.5.21/pgp.c mutt-1.5.21/pgp.c
---- orig.010003/mutt-1.5.21/pgp.c      2010-09-13 19:19:55.000000000 +0200
-+++ mutt-1.5.21/pgp.c  2011-03-02 18:48:08.000000000 +0100
-@@ -251,7 +251,7 @@
-   int needpass = -1, pgp_keyblock = 0;
-   int clearsign = 0, rv, rc;
-   int c = 1; /* silence GCC warning */
--  long start_pos = 0;
-+  LOFF_T start_pos = 0;
-   long bytes;
-   LOFF_T last_pos, offset;
-   char buf[HUGE_STRING];
-diff -ur orig.010003/mutt-1.5.21/smime.c mutt-1.5.21/smime.c
---- orig.010003/mutt-1.5.21/smime.c    2010-09-13 19:19:55.000000000 +0200
-+++ mutt-1.5.21/smime.c        2011-03-02 18:12:08.000000000 +0100
-@@ -1546,7 +1546,7 @@
-   pid_t thepid;
-   int badsig = -1;
- 
--  long tmpoffset = 0;
-+  LOFF_T  tmpoffset = 0;
-   size_t tmplength = 0;
-   int origType = sigbdy->type;
-   char *savePrefix = NULL;
-@@ -1660,7 +1660,7 @@
- {
-   int len=0;
-   int c;
--  long last_pos;
-+  LOFF_T last_pos;
-   char buf[HUGE_STRING];
-   char outfile[_POSIX_PATH_MAX], errfile[_POSIX_PATH_MAX];
-   char tmpfname[_POSIX_PATH_MAX];
-@@ -1865,7 +1865,7 @@
- 
-   char tempfile[_POSIX_PATH_MAX];
-   STATE s;
--  long tmpoffset = b->offset;
-+  LOFF_T tmpoffset = b->offset;
-   size_t tmplength = b->length;
-   int origType = b->type;
-   FILE *tmpfp=NULL;

++++++ mutt-1.5.21-cariage-return.path -> mutt-1.5.23-cariage-return.path ++++++
--- /work/SRC/openSUSE:Factory/mutt/mutt-1.5.21-cariage-return.path     
2013-06-05 13:31:14.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.mutt.new/mutt-1.5.23-cariage-return.path        
2015-01-27 09:09:24.000000000 +0100
@@ -1,41 +1,13 @@
---- crypt-gpgme.c
-+++ crypt-gpgme.c      2013-05-29 09:31:53.141939173 +0000
-@@ -2003,12 +2003,12 @@ static int pgp_check_traditional_one_bod
-   {
-     if (!mutt_strncmp ("-----BEGIN PGP ", buf, 15))
-     {
--      if (!mutt_strcmp ("MESSAGE-----\n", buf + 15))
-+      if (!mutt_strxcmp ("MESSAGE-----\n", buf + 15))
-       {
-       enc = 1;
-       break;
-       }
--      else if (!mutt_strcmp ("SIGNED MESSAGE-----\n", buf + 15))
-+      else if (!mutt_strxcmp ("SIGNED MESSAGE-----\n", buf + 15))
-       {
-       sgn = 1;
-       break;
-@@ -2196,14 +2196,14 @@ int pgp_gpgme_application_handler (BODY
-           clearsign = 0;
-           start_pos = last_pos;
-           
--          if (!mutt_strcmp ("MESSAGE-----\n", buf + 15))
-+          if (!mutt_strxcmp ("MESSAGE-----\n", buf + 15))
-             needpass = 1;
--          else if (!mutt_strcmp ("SIGNED MESSAGE-----\n", buf + 15))
-+          else if (!mutt_strxcmp ("SIGNED MESSAGE-----\n", buf + 15))
-             {
-               clearsign = 1;
-               needpass = 0;
-             }
--          else if (!mutt_strcmp ("PUBLIC KEY BLOCK-----\n", buf + 15))
-+          else if (!mutt_strxcmp ("PUBLIC KEY BLOCK-----\n", buf + 15))
-           {
-             needpass = 0;
-             pgp_keyblock = 1;
+---
+ lib.c   |   12 ++++++++++++
+ lib.h   |    1 +
+ pager.c |    2 +-
+ pgp.c   |   24 ++++++++++++------------
+ 4 files changed, 26 insertions(+), 13 deletions(-)
+
 --- lib.c
-+++ lib.c      2013-05-29 09:31:53.325439198 +0000
-@@ -875,6 +875,18 @@ int mutt_strcmp(const char *a, const cha
++++ lib.c      2013-05-29 09:31:53.000000000 +0000
+@@ -876,6 +876,18 @@ int mutt_strcmp(const char *a, const cha
    return strcmp(NONULL(a), NONULL(b));
  }
  
@@ -55,8 +27,8 @@
  {
    return strcasecmp(NONULL(a), NONULL(b));
 --- lib.h
-+++ lib.h      2013-05-29 09:25:21.805439324 +0000
-@@ -179,6 +179,7 @@ int mutt_copy_bytes (FILE *, FILE *, siz
++++ lib.h      2013-05-29 09:25:22.000000000 +0000
+@@ -197,6 +197,7 @@ int mutt_copy_bytes (FILE *, FILE *, siz
  int mutt_rx_sanitize_string (char *, size_t, const char *);
  int mutt_strcasecmp (const char *, const char *);
  int mutt_strcmp (const char *, const char *);
@@ -65,7 +37,7 @@
  int mutt_strncmp (const char *, const char *, size_t);
  int mutt_strcoll (const char *, const char *);
 --- pager.c
-+++ pager.c    2013-05-29 09:31:53.433440090 +0000
++++ pager.c    2013-05-29 09:31:53.000000000 +0000
 @@ -771,7 +771,7 @@ resolve_types (char *buf, char *raw, str
    else if (check_attachment_marker ((char *) raw) == 0)
      lineInfo[n].type = MT_COLOR_ATTACHMENT;
@@ -76,10 +48,19 @@
      i = n + 1;
  
 --- pgp.c
-+++ pgp.c      2013-05-29 09:31:53.461439587 +0000
-@@ -287,14 +287,14 @@ int pgp_application_pgp_handler (BODY *m
++++ pgp.c      2015-01-26 15:48:02.361518080 +0000
+@@ -219,7 +219,7 @@ static void pgp_copy_clearsigned (FILE *
+       continue;
+     }
+ 
+-    if (mutt_strcmp (buf, "-----BEGIN PGP SIGNATURE-----\n") == 0)
++    if (mutt_strxcmp (buf, "-----BEGIN PGP SIGNATURE-----\n") == 0)
+       break;
+     
+     if (armor_header)
+@@ -285,14 +285,14 @@ int pgp_application_pgp_handler (BODY *m
+     {
        clearsign = 0;
-       start_pos = last_pos;
  
 -      if (mutt_strcmp ("MESSAGE-----\n", buf + 15) == 0)
 +      if (mutt_strxcmp ("MESSAGE-----\n", buf + 15) == 0)
@@ -95,7 +76,7 @@
        {
          needpass = 0;
          pgp_keyblock = 1;
-@@ -327,10 +327,10 @@ int pgp_application_pgp_handler (BODY *m
+@@ -325,10 +325,10 @@ int pgp_application_pgp_handler (BODY *m
        
        fputs (buf, tmpfp);
  
@@ -109,7 +90,7 @@
          break;
        /* remember optional Charset: armor header as defined by RfC4880 */
        if (mutt_strncmp ("Charset: ", buf, 9) == 0)
-@@ -552,11 +552,11 @@ static int pgp_check_traditional_one_bod
+@@ -550,11 +550,11 @@ static int pgp_check_traditional_one_bod
    {
      if (mutt_strncmp ("-----BEGIN PGP ", buf, 15) == 0)
      {
@@ -124,7 +105,7 @@
        key = 1;
      }
    }
-@@ -1065,9 +1065,9 @@ BODY *pgp_sign_message (BODY *a)
+@@ -1063,9 +1063,9 @@ BODY *pgp_sign_message (BODY *a)
     */
    while (fgets (buffer, sizeof (buffer) - 1, pgpout) != NULL)
    {

++++++ mutt-1.5.21-patches.tar.bz2 -> mutt-1.5.23-patches.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mutt-1.5.21-patches/1771-pipe-mime.patch 
new/mutt-1.5.23-patches/1771-pipe-mime.patch
--- old/mutt-1.5.21-patches/1771-pipe-mime.patch        2011-06-20 
13:57:59.000000000 +0200
+++ new/mutt-1.5.23-patches/1771-pipe-mime.patch        1970-01-01 
01:00:00.000000000 +0100
@@ -1,34 +0,0 @@
-Don't draw imap fetch progress if we aren't in visual mode.
-Drawing progress leaves terminal in confusing state when piping a message
-from pager to less(1). See http://bugs.mutt.org/1771
-
---- a/imap/message.c
-+++ b/imap/message.c
-@@ -398,7 +398,7 @@
-   char path[_POSIX_PATH_MAX];
-   char *pc;
-   long bytes;
--  progress_t progressbar;
-+  progress_t progressbar, *pbar;
-   int uid;
-   int cacheno;
-   IMAP_CACHE *cache;
-@@ -495,9 +495,15 @@
-           imap_error ("imap_fetch_message()", buf);
-           goto bail;
-         }
--        mutt_progress_init (&progressbar, _("Fetching message..."),
--                            M_PROGRESS_SIZE, NetInc, bytes);
--        if (imap_read_literal (msg->fp, idata, bytes, &progressbar) < 0)
-+        if (!isendwin())
-+        {
-+          mutt_progress_init (&progressbar, _("Fetching message..."),
-+                            M_PROGRESS_SIZE, NetInc, bytes);
-+          pbar = &progressbar;
-+        }
-+        else
-+          pbar = NULL;
-+        if (imap_read_literal (msg->fp, idata, bytes, pbar) < 0)
-           goto bail;
-         /* pick up trailing line */
-         if ((rc = imap_cmd_step (idata)) != IMAP_CMD_CONTINUE)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mutt-1.5.21-patches/2179-score-match.patch 
new/mutt-1.5.23-patches/2179-score-match.patch
--- old/mutt-1.5.21-patches/2179-score-match.patch      2011-06-20 
13:58:32.000000000 +0200
+++ new/mutt-1.5.23-patches/2179-score-match.patch      1970-01-01 
01:00:00.000000000 +0100
@@ -1,14 +0,0 @@
-better matching for ~f, same as mutt-ng did, see upstream
-http://bugs.mutt.org/2179
-
---- a/score.c
-+++ b/score.c
-@@ -133,7 +133,7 @@
-   hdr->score = 0; /* in case of re-scoring */
-   for (tmp = Score; tmp; tmp = tmp->next)
-   {
--    if (mutt_pattern_exec (tmp->pat, 0, NULL, hdr) > 0)
-+    if (mutt_pattern_exec (tmp->pat, M_MATCH_FULL_ADDRESS, NULL, hdr) > 0)
-     {
-       if (tmp->exact || tmp->val == 9999 || tmp->val == -9999)
-       {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mutt-1.5.21-patches/3240-imapuser.patch 
new/mutt-1.5.23-patches/3240-imapuser.patch
--- old/mutt-1.5.21-patches/3240-imapuser.patch 2011-06-20 14:00:20.000000000 
+0200
+++ new/mutt-1.5.23-patches/3240-imapuser.patch 1970-01-01 01:00:00.000000000 
+0100
@@ -1,14 +0,0 @@
-fixes a problem where the imap->login has the precedence so the user
-is asked with wrong informaton, see upstream #3240
-
---- a/account.c
-+++ b/account.c
-@@ -222,7 +222,7 @@
-   else
-   {
-     snprintf (prompt, sizeof (prompt), _("Password for %s@%s: "),
--              account->flags & M_ACCT_LOGIN ? account->login : account->user,
-+              ((account->flags & M_ACCT_LOGIN) && !(account->user)) ? 
account->login : account->user,
-               account->host);
-     account->pass[0] = '\0';
-     if (mutt_get_password (prompt, account->pass, sizeof (account->pass)))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mutt-1.5.21-patches/3261-readonly-open.patch 
new/mutt-1.5.23-patches/3261-readonly-open.patch
--- old/mutt-1.5.21-patches/3261-readonly-open.patch    2011-06-20 
13:59:39.000000000 +0200
+++ new/mutt-1.5.23-patches/3261-readonly-open.patch    1970-01-01 
01:00:00.000000000 +0100
@@ -1,26 +0,0 @@
-Open attachments as read-only so the editor won't be able to modify it;
-otherwise the user can believe that he/she can edit it and risk to lose his/her
-work (see upstream bug http://bugs.mutt.org/3261)
-
---- a/attach.c
-+++ b/attach.c
-@@ -492,6 +492,7 @@ int mutt_view_attachment (FILE *fp, BODY
-       FREE (&fname);
-       if (mutt_save_attachment (fp, a, tempfile, 0, NULL) == -1)
-       goto return_error;
-+      chmod (tempfile, 0400);
-     }
- 
-     use_pipe = rfc1524_expand_command (a, tempfile, type,
-@@ -633,7 +634,11 @@ int mutt_view_attachment (FILE *fp, BODY
-   if (entry)
-     rfc1524_free_entry (&entry);
-   if (fp && tempfile[0])
-+  {
-+    /* Restore write permission so mutt_unlink can open the file for writing 
*/
-+    chmod(tempfile, 0600);
-     mutt_unlink (tempfile);
-+  }
-   else if (unlink_tempfile)
-     unlink(tempfile);
- 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/mutt-1.5.21-patches/3288-mx_update_context-segfault.patch 
new/mutt-1.5.23-patches/3288-mx_update_context-segfault.patch
--- old/mutt-1.5.21-patches/3288-mx_update_context-segfault.patch       
2011-07-07 13:21:51.000000000 +0200
+++ new/mutt-1.5.23-patches/3288-mx_update_context-segfault.patch       
1970-01-01 01:00:00.000000000 +0100
@@ -1,66 +0,0 @@
-Patch written by hhorak@, it should fix a segfault that happens when there are
-holes due to deleted messages, this should fix both #584138 and #537694 (the
-second as a side-effect), therefore the previous
-upstream/537694-segv-imap-headers.patch is removed
-
-This patch was retrieved from the original upstream bug
-http://bugs.mutt.org/3288
-
---- a/imap/message.c
-+++ b/imap/message.c
-@@ -65,7 +65,7 @@ int imap_read_headers (IMAP_DATA* idata,
-   char *hdrreq = NULL;
-   FILE *fp;
-   char tempfile[_POSIX_PATH_MAX];
--  int msgno, idx;
-+  int msgno, idx = msgbegin - 1;
-   IMAP_HEADER h;
-   IMAP_STATUS* status;
-   int rc, mfhrc, oldmsgcount;
-@@ -185,7 +185,7 @@ int imap_read_headers (IMAP_DATA* idata,
-           continue;
-         }
- 
--        idx = h.sid - 1;
-+        idx++;
-         ctx->hdrs[idx] = imap_hcache_get (idata, h.data->uid);
-         if (ctx->hdrs[idx])
-         {
-@@ -211,6 +211,7 @@ int imap_read_headers (IMAP_DATA* idata,
-           dprint (3, (debugfile, "bad cache entry at %d, giving up\n", h.sid 
- 1));
-           imap_free_header_data((void**) (void*) &h.data);
-           evalhc = 0;
-+          idx--;
-         }
-       }
-       while (rc != IMAP_CMD_OK && mfhrc == -1);
-@@ -273,18 +274,20 @@ int imap_read_headers (IMAP_DATA* idata,
-       {
-         dprint (2, (debugfile, "msg_fetch_header: ignoring fetch response 
with no body\n"));
-         mfhrc = -1;
-+        msgend--;
-         continue;
-       }
- 
-       /* make sure we don't get remnants from older larger message headers */
-       fputs ("\n\n", fp);
- 
--      idx = h.sid - 1;
-+      idx++;
-       if (idx > msgend)
-       {
-         dprint (1, (debugfile, "imap_read_headers: skipping FETCH response 
for "
-                     "unknown message number %d\n", h.sid));
-         mfhrc = -1;
-+        idx--;
-         continue;
-       }
-       /* May receive FLAGS updates in a separate untagged response (#2935) */
-@@ -292,6 +295,7 @@ int imap_read_headers (IMAP_DATA* idata,
-       {
-       dprint (2, (debugfile, "imap_read_headers: message %d is not new\n",
-                   h.sid));
-+        idx--;
-       continue;
-       }
- 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/mutt-1.5.21-patches/3293-dont-recode-saved-attachments.patch 
new/mutt-1.5.23-patches/3293-dont-recode-saved-attachments.patch
--- old/mutt-1.5.21-patches/3293-dont-recode-saved-attachments.patch    
2011-06-20 14:02:10.000000000 +0200
+++ new/mutt-1.5.23-patches/3293-dont-recode-saved-attachments.patch    
1970-01-01 01:00:00.000000000 +0100
@@ -1,14 +0,0 @@
-As a side effect of the fix for http://bugs.mutt.org/3234, mutt is recoding all
-save attachments, this is causing problems; a proper fix for this issue is 
being
-tracked on http://bugs.mutt.org/3293
-
---- a/attach.c
-+++ b/attach.c
-@@ -807,7 +807,6 @@
-       STATE s;
- 
-       memset (&s, 0, sizeof (s));
--      s.flags |= M_CHARCONV;
- 
-       if ((s.fpout = mutt_save_attachment_open (path, flags)) == NULL)
-       {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mutt-1.5.21-patches/3300-gpgme-1.2.patch 
new/mutt-1.5.23-patches/3300-gpgme-1.2.patch
--- old/mutt-1.5.21-patches/3300-gpgme-1.2.patch        2011-06-20 
14:05:45.000000000 +0200
+++ new/mutt-1.5.23-patches/3300-gpgme-1.2.patch        1970-01-01 
01:00:00.000000000 +0100
@@ -1,27 +0,0 @@
-this patch fixes upstream bug http://bugs.mutt.org/3300 so that
-mutt will be able to open pgp crypted/signed message with gpgme
-
---- a/init.c
-+++ b/init.c
-@@ -53,6 +53,10 @@
- #include <sys/wait.h>
- #include <sys/time.h>
- 
-+#if defined(CRYPT_BACKEND_GPGME)
-+#include <gpgme.h>
-+#endif
-+
- #define CHECK_PAGER \
-   if ((CurrentMenu == MENU_PAGER) && (idx >= 0) &&    \
-           (MuttVars[idx].flags & R_RESORT)) \
-@@ -3266,6 +3270,10 @@
- 
-   mutt_read_histfile ();
- 
-+#ifdef CRYPT_BACKEND_GPGME
-+  gpgme_check_version (NULL);
-+#endif
-+
- #if 0
-   set_option (OPTWEED); /* turn weeding on by default */
- #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mutt-1.5.21-patches/3324-smimekeys-tmpdir.patch 
new/mutt-1.5.23-patches/3324-smimekeys-tmpdir.patch
--- old/mutt-1.5.21-patches/3324-smimekeys-tmpdir.patch 2011-06-20 
14:03:56.000000000 +0200
+++ new/mutt-1.5.23-patches/3324-smimekeys-tmpdir.patch 1970-01-01 
01:00:00.000000000 +0100
@@ -1,13 +0,0 @@
-skip the configured tmpdir if it contains '=', that convention is used only by
-mutt, see upstream http://bugs.mutt.org/3324
-
---- a/smime_keys.pl
-+++ b/smime_keys.pl
-@@ -946,6 +946,7 @@
-       $option = "notemp" if (not defined($option));
-       if (! $tmpdir and $option eq "temp") {
-               $tmpdir = mutt_Q 'tmpdir';
-+                $tmpdir = '/tmp' if ($tmpdir =~ m/=/); # if the tmpdir 
contains '=', use the default
-               $tmpdir = newfile("$tmpdir/smime");
-               mkdir $tmpdir, 0700 || die "Can't create $tmpdir: $!\n";
-       }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mutt-1.5.21-patches/3326-emptycharset.patch 
new/mutt-1.5.23-patches/3326-emptycharset.patch
--- old/mutt-1.5.21-patches/3326-emptycharset.patch     2011-06-20 
14:03:19.000000000 +0200
+++ new/mutt-1.5.23-patches/3326-emptycharset.patch     1970-01-01 
01:00:00.000000000 +0100
@@ -1,15 +0,0 @@
-without this patch mutt crashes if any option that contains charset is set to
-empty, see upstream bug http://bugs.mutt.org/3326
-
---- a/init.c
-+++ b/init.c
-@@ -1732,6 +1732,9 @@
-   char *p, *q = NULL, *s = safe_strdup (val);
-   int rc = 0, strict = strcmp (opt->option, "send_charset") == 0;
- 
-+  if (!s)
-+    return rc;
-+
-   for (p = strtok_r (s, ":", &q); p; p = strtok_r (NULL, ":", &q))
-   {
-     if (!*p)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mutt-1.5.21-patches/3335-thread-segfault.patch 
new/mutt-1.5.23-patches/3335-thread-segfault.patch
--- old/mutt-1.5.21-patches/3335-thread-segfault.patch  2011-06-20 
14:04:24.000000000 +0200
+++ new/mutt-1.5.23-patches/3335-thread-segfault.patch  1970-01-01 
01:00:00.000000000 +0100
@@ -1,17 +0,0 @@
-added a patch to prevent segfault when Ctrl+R is hit on a malformed group of
-messages (see upstream bug http://bugs.mutt.org/3335)
-
---- a/flags.c
-+++ b/flags.c
-@@ -303,7 +303,10 @@
- int mutt_thread_set_flag (HEADER *hdr, int flag, int bf, int subthread)
- {
-   THREAD *start, *cur = hdr->thread;
--  
-+
-+  if ( !hdr->thread )
-+    return (-1);
-+
-   if ((Sort & SORT_MASK) != SORT_THREADS)
-   {
-     mutt_error _("Threading is not enabled.");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mutt-1.5.21-patches/3339-smime_keys-chaining.patch 
new/mutt-1.5.23-patches/3339-smime_keys-chaining.patch
--- old/mutt-1.5.21-patches/3339-smime_keys-chaining.patch      2011-06-20 
14:05:03.000000000 +0200
+++ new/mutt-1.5.23-patches/3339-smime_keys-chaining.patch      1970-01-01 
01:00:00.000000000 +0100
@@ -1,84 +0,0 @@
-To suppose certificate chaining in smime_keys, see upstream
-http://bugs.mutt.org/3339
-
---- a/smime_keys.pl
-+++ b/smime_keys.pl
-@@ -81,6 +81,30 @@
- # OPS
- #
- 
-+ 
-+sub get_certs {
-+    my $file = shift;
-+    return undef unless (defined($file) && -e $file);
-+
-+    open IN, "<$file";
-+
-+    my @certs = ();
-+    my $in_cert = 0;
-+    my $cert = q{};
-+    while ( <IN> ) {
-+        $in_cert = 1 if ( /^-----BEGIN CERTIFICATE-----$/ );
-+        $cert .= $_;
-+
-+        if ( /^-----END CERTIFICATE-----$/ )  {
-+            push @certs, $cert;
-+            $cert = q{};
-+            $in_cert = 0;
-+        }
-+    }
-+
-+    return @certs;
-+}
-+
- if(@ARGV == 1 and $ARGV[0] eq "init") {
-     init_paths;
- }
-@@ -91,13 +115,27 @@
-     change_label($ARGV[1]);
- }
- elsif(@ARGV == 2 and $ARGV[0] eq "add_cert") {
--    my $format = -B $ARGV[1] ? 'DER' : 'PEM'; 
--    my $cmd = "$opensslbin x509 -noout -hash -in $ARGV[1] -inform $format";
--    my $cert_hash = `$cmd`;
--    $? and die "'$cmd' returned $?";
--    chomp($cert_hash); 
--    my $label = query_label;
--    &add_certificate($ARGV[1], \$cert_hash, 1, $label, '?');
-+    foreach my $cert ( get_certs( $ARGV[1] ) ) {
-+
-+        my $file = sprintf( '/tmp/smime-%d.%d', $$, int(rand( 999999 ) ) );
-+        print STDERR "TMPFILE: $file\n";
-+        if ( -e $file ) {
-+            die( "ERROR: TMPFILE $file existss?!?!" );
-+        }
-+        open OUT, ">$file";
-+        print OUT $cert;
-+        close OUT;
-+
-+        my $format = -B $file ? 'DER' : 'PEM'; 
-+        my $cmd = "$opensslbin x509 -noout -hash -in $file -inform $format";
-+
-+        my $cert_hash = `$cmd`;
-+        $? and die "'$cmd' returned $?";
-+        chomp($cert_hash); 
-+        my $label = query_label;
-+        &add_certificate($ARGV[1], \$cert_hash, 1, $label, '?');
-+        unlink $file;
-+    }
- }
- elsif(@ARGV == 2 and $ARGV[0] eq "add_pem") {
-     -e $ARGV[1] and -s $ARGV[1] or die("$ARGV[1] is nonexistent or empty.");
-@@ -381,9 +419,10 @@
-     print "the key ID. This has to be _one_ word (no whitespaces).\n\n";
- 
-     print "Enter label: ";
--    chomp($input = <STDIN>);
-+    $input = <STDIN>;
-+    chomp($input) if ( defined($input) );
- 
--    my ($label, $junk) = split(/\s/, $input, 2);     
-+    my ($label, $junk) = split(/\s/, $input, 2) if ( defined($input) );
-     
-     defined $junk 
-         and print "\nUsing '$label' as label; ignoring '$junk'\n";
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mutt-1.5.21-patches/3371-ansi-escape-segfault.patch 
new/mutt-1.5.23-patches/3371-ansi-escape-segfault.patch
--- old/mutt-1.5.21-patches/3371-ansi-escape-segfault.patch     2011-06-20 
14:06:42.000000000 +0200
+++ new/mutt-1.5.23-patches/3371-ansi-escape-segfault.patch     1970-01-01 
01:00:00.000000000 +0100
@@ -1,17 +0,0 @@
-This patch prevents mutt from crashing when *buf is freed, the root cause is 
the
-fact that an adjacent memory segment (*fmt) overruns and overwrite prev_size
-field in the heap.
-
-The bug upstream see http://bugs.mutt.org/3371
-
---- a/pager.c
-+++ b/pager.c
-@@ -1053,7 +1053,7 @@
-     q = *fmt;
-     while (*p)
-     {
--      if (*p == '\010' && (p > *buf))
-+      if (*p == '\010' && (p > *buf) && (q > *fmt))
-       {
-       if (*(p+1) == '_')      /* underline */
-         p += 2;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mutt-1.5.21-patches/3378-references.patch 
new/mutt-1.5.23-patches/3378-references.patch
--- old/mutt-1.5.21-patches/3378-references.patch       2011-06-20 
14:10:31.000000000 +0200
+++ new/mutt-1.5.23-patches/3378-references.patch       1970-01-01 
01:00:00.000000000 +0100
@@ -1,17 +0,0 @@
-The purpose of this patch is to preserve the References header if the
-In-Reply-To header is not initially present; see upstream
-http://bugs.mutt.org/3378
-
---- a/headers.c
-+++ b/headers.c
-@@ -114,8 +114,8 @@
-      $edit_headers set, we remove References: as they're likely invalid;
-      we can simply compare strings as we don't generate References for
-      multiple Message-Ids in IRT anyways */
--  if (!n->in_reply_to || (msg->env->in_reply_to &&
--                        mutt_strcmp (n->in_reply_to->data,
-+  if (msg->env->in_reply_to &&
-+     (!n->in_reply_to || mutt_strcmp (n->in_reply_to->data,
-                                      msg->env->in_reply_to->data) != 0))
-     mutt_free_list (&msg->env->references);
- 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mutt-1.5.21-patches/3457-pop3-segfault.patch 
new/mutt-1.5.23-patches/3457-pop3-segfault.patch
--- old/mutt-1.5.21-patches/3457-pop3-segfault.patch    2011-06-20 
14:16:33.000000000 +0200
+++ new/mutt-1.5.23-patches/3457-pop3-segfault.patch    1970-01-01 
01:00:00.000000000 +0100
@@ -1,14 +0,0 @@
-Fix a segfault that happens when $message_cachedir is set and a POP3 mailbox is
-being opened, patch fetched from upstream bug http://bugs.mutt.org/3457
-
---- a/muttlib.c
-+++ b/muttlib.c
-@@ -1962,6 +1962,7 @@
- {
-   char *p = safe_strdup (src);
-   int rc = mutt_convert_string (&p, Charset, "utf-8", 0);
--  strfcpy (dest, rc == 0 ? p : src, dlen);
-+  /* `src' may be NULL, such as when called from the pop3 driver. */
-+  strfcpy (dest, (rc == 0) ? NONULL(p) : NONULL(src), dlen);
-   FREE (&p);
- }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mutt-1.5.21-patches/3459-split-fetches.patch 
new/mutt-1.5.23-patches/3459-split-fetches.patch
--- old/mutt-1.5.21-patches/3459-split-fetches.patch    2011-07-07 
13:23:06.000000000 +0200
+++ new/mutt-1.5.23-patches/3459-split-fetches.patch    1970-01-01 
01:00:00.000000000 +0100
@@ -1,21 +0,0 @@
-A workaround for Exchange 2010 IMAP protocol, tracked in
-http://bugs.mutt.org/3459, already merged in the ubuntu version of mutt
-
---- a/imap/message.c
-+++ b/imap/message.c
-@@ -243,6 +243,15 @@ int imap_read_headers (IMAP_DATA* idata,
-       char *cmd;
- 
-       fetchlast = msgend + 1;
-+      /* Microsoft Exchange 2010 violates the IMAP protocol and
-+       * starts omitting messages if one FETCHes more than 2047 (or
-+       * or somewhere around that number. We therefore split the
-+       * FETCH into chunks of 2000 messages each */
-+      if (fetchlast - msgno - 1 > 2000)
-+      {
-+        fetchlast = msgno+1 + 2000;
-+      }
-+
-       safe_asprintf (&cmd, "FETCH %d:%d (UID FLAGS INTERNALDATE RFC822.SIZE 
%s)",
-                      msgno + 1, fetchlast, hdrreq);
-       imap_cmd_start (idata, cmd);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mutt-1.5.21-patches/3483-header-strchr.patch 
new/mutt-1.5.23-patches/3483-header-strchr.patch
--- old/mutt-1.5.21-patches/3483-header-strchr.patch    2011-06-20 
14:10:56.000000000 +0200
+++ new/mutt-1.5.23-patches/3483-header-strchr.patch    1970-01-01 
01:00:00.000000000 +0100
@@ -1,14 +0,0 @@
-This fixes a segfault that can happen on a malformed message; patch comes from
-upstream http://bugs.mutt.org/3483
-
---- a/sendlib.c
-+++ b/sendlib.c
-@@ -1799,7 +1799,7 @@
-   else
-   {
-     t = strchr (start, ':');
--    if (t > end)
-+    if (!t || t > end)
-     {
-       dprint (1, (debugfile, "mwoh: warning: header not in "
-                 "'key: value' format!\n"));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/mutt-1.5.21-patches/3496-no-implicit_autoview-for-text-html.patch 
new/mutt-1.5.23-patches/3496-no-implicit_autoview-for-text-html.patch
--- old/mutt-1.5.21-patches/3496-no-implicit_autoview-for-text-html.patch       
2011-06-20 14:14:12.000000000 +0200
+++ new/mutt-1.5.23-patches/3496-no-implicit_autoview-for-text-html.patch       
1970-01-01 01:00:00.000000000 +0100
@@ -1,34 +0,0 @@
-This patch blacklist text/html from the list of documents that will be
-shown automatically, the patch (the muttlib.c part) has been written by
-Loïc Minier <[email protected]>, I've added the documentation bit.
-
-The patch has been forwarded upstream originally by Loïc on:
-http://bugs.mutt.org/3496.
-
-The original Debian bug for this problem is http://bugs.debian.org/611410
-
---- a/init.h
-+++ b/init.h
-@@ -1211,7 +1211,9 @@
-   ** ``\fCcopiousoutput\fP'' flag set for \fIevery\fP MIME attachment it 
doesn't have
-   ** an internal viewer defined for.  If such an entry is found, mutt will
-   ** use the viewer defined in that entry to convert the body part to text
--  ** form.
-+  ** form. MIME attachments with 'text' types, with the only exception
-+  ** of text/html, are excluded: they will be shown as they are unless 
auto_view
-+  ** is specified.
-   */
-   { "include",                DT_QUAD, R_NONE, OPT_INCLUDE, M_ASKYES },
-   /*
---- a/muttlib.c
-+++ b/muttlib.c
-@@ -658,6 +658,9 @@
-   switch (m->type)
-   {
-     case TYPETEXT:
-+      /* we don't want to display text/html */
-+      if (!ascii_strcasecmp ("html", m->subtype))
-+        return 1;
-       /* we can display any text, overridable by auto_view */
-       return 0;
-       break;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mutt-1.5.21-patches/3506-gnutls-CN-validation.patch 
new/mutt-1.5.23-patches/3506-gnutls-CN-validation.patch
--- old/mutt-1.5.21-patches/3506-gnutls-CN-validation.patch     2011-06-20 
14:16:10.000000000 +0200
+++ new/mutt-1.5.23-patches/3506-gnutls-CN-validation.patch     1970-01-01 
01:00:00.000000000 +0100
@@ -1,36 +0,0 @@
-This patch addresses a security problem due to the fact that the validation of
-the SSL CN is not correctly done in the gnutls-related code of mutt.
-
-The patch has been provided by hhorak on http://bugs.mutt.org/3506, the 
original
-bug where the security problem was reported for Debian is
-http://bugs.debian.org/619216
-
---- a/mutt_ssl_gnutls.c
-+++ b/mutt_ssl_gnutls.c
-@@ -999,6 +999,7 @@
-   unsigned int cert_list_size = 0;
-   gnutls_certificate_status certstat;
-   int certerr, i, preauthrc, savedcert, rc = 0;
-+  int rcpeer;
- 
-   if (gnutls_auth_get_type (state) != GNUTLS_CRD_CERTIFICATE)
-   {
-@@ -1024,6 +1025,9 @@
-   for (i = 0; i < cert_list_size; i++) {
-     rc = tls_check_preauth(&cert_list[i], certstat, conn->account.host, i,
-                            &certerr, &savedcert);
-+    if (i ==0)
-+      rcpeer = rc;
-+
-     preauthrc += rc;
- 
-     if (savedcert)
-@@ -1049,7 +1053,7 @@
-         dprint (1, (debugfile, "error trusting certificate %d: %d\n", i, rc));
- 
-       certstat = tls_verify_peers (state);
--      if (!certstat)
-+      if (!certstat && !rcpeer)
-         return 1;
-     }
-   }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/mutt-1.5.21-patches/3515-gnutls-deprecated-set-priority.patch 
new/mutt-1.5.23-patches/3515-gnutls-deprecated-set-priority.patch
--- old/mutt-1.5.21-patches/3515-gnutls-deprecated-set-priority.patch   
2011-06-20 14:17:41.000000000 +0200
+++ new/mutt-1.5.23-patches/3515-gnutls-deprecated-set-priority.patch   
1970-01-01 01:00:00.000000000 +0100
@@ -1,76 +0,0 @@
-Replace the deprecated gnutls_protocol_set_priority() with
-gnutls_priority_set_direct()
-
-Reported on http://bugs.debian.org/624058
-Report upstream on http://bugs.mutt.org/3515
-
---- a/mutt_ssl_gnutls.c
-+++ b/mutt_ssl_gnutls.c
-@@ -238,8 +238,6 @@
-   gnutls_x509_crt_deinit (clientcrt);
- }
- 
--static int protocol_priority[] = {GNUTLS_TLS1, GNUTLS_SSL3, 0};
--
- /* tls_negotiate: After TLS state has been initialised, attempt to negotiate
-  *   TLS over the wire, including certificate checks. */
- static int tls_negotiate (CONNECTION * conn)
-@@ -247,6 +245,18 @@
-   tlssockdata *data;
-   int err;
- 
-+#if GNUTLS_VERSION_MAJOR >= 2 && GNUTLS_VERSION_MINOR >= 12
-+  char *force_sslv3_str = "NORMAL:-VERS-TLS-ALL:+VERS-SSL3.0";
-+  char *force_tls_str = "NORMAL:-VERS-SSL3.0:+VERS-TLS-ALL";
-+#else
-+  char *force_sslv3_str =
-+        "NORMAL:-VERS-TLS1.2:-VERS-TLS1.1:-VERS-TLS1.0:+VERS-SSL3.0";
-+  char *force_tls_str = 
"NORMAL:-VERS-SSL3.0:+VERS-TLS-1.2:+VERS-TLS1.1:+VERS-TLS1.0";
-+#endif
-+  char *priority_str = "NORMAL";
-+  const char *error_pos;
-+  int error_code;
-+
-   data = (tlssockdata *) safe_calloc (1, sizeof (tlssockdata));
-   conn->sockdata = data;
-   err = gnutls_certificate_allocate_credentials (&data->xcred);
-@@ -294,13 +304,11 @@
-   }
-   else if (!option(OPTTLSV1))
-   {
--    protocol_priority[0] = GNUTLS_SSL3;
--    protocol_priority[1] = 0;
-+    priority_str = force_sslv3_str;
-   }
-   else if (!option(OPTSSLV3))
-   {
--    protocol_priority[0] = GNUTLS_TLS1;
--    protocol_priority[1] = 0;
-+    priority_str = force_tls_str;
-   }
-   /*
-   else
-@@ -309,8 +317,21 @@
- 
-   /* We use default priorities (see gnutls documentation),
-      except for protocol version */
--  gnutls_set_default_priority (data->state);
--  gnutls_protocol_set_priority (data->state, protocol_priority);
-+  error_pos = NULL;
-+  if ( (error_code = gnutls_priority_set_direct (data->state, priority_str,
-+                   &error_pos)) != 0 )
-+  {
-+    if ( error_pos )
-+    {
-+      mutt_error("gnutls_priority_set_direct(%s) pos %s", priority_str, 
error_pos);
-+    }
-+    else
-+    {
-+      mutt_error("gnutls_priority_set_direct(%s)", priority_str);
-+    }
-+    mutt_sleep(2);
-+    goto fail;
-+  }
- 
-   if (SslDHPrimeBits > 0)
-   {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/mutt-1.5.21-patches/3516-gnutls-deprecated-verify-peers.patch 
new/mutt-1.5.23-patches/3516-gnutls-deprecated-verify-peers.patch
--- old/mutt-1.5.21-patches/3516-gnutls-deprecated-verify-peers.patch   
2011-06-20 14:18:08.000000000 +0200
+++ new/mutt-1.5.23-patches/3516-gnutls-deprecated-verify-peers.patch   
1970-01-01 01:00:00.000000000 +0100
@@ -1,47 +0,0 @@
-Remove the deprecated gnutls_certificate_verify_peers() in favour of the new
-gnutls_certificate_veirfy_peers2()
-
-Reported on http://bugs.debian.org/624085
-Reported upstream on http://bugs.mutt.org/3516
-
---- a/mutt_ssl_gnutls.c
-+++ b/mutt_ssl_gnutls.c
-@@ -960,22 +960,22 @@
- /* sanity-checking wrapper for gnutls_certificate_verify_peers */
- static gnutls_certificate_status tls_verify_peers (gnutls_session tlsstate)
- {
--  gnutls_certificate_status certstat;
-+  unsigned int verify_ret, status;
- 
--  certstat = gnutls_certificate_verify_peers (tlsstate);
--  if (!certstat)
--    return certstat;
-+  verify_ret = gnutls_certificate_verify_peers2 (tlsstate, &status);
-+  if (!verify_ret)
-+    return status;
- 
--  if (certstat == GNUTLS_E_NO_CERTIFICATE_FOUND)
-+  if (status == GNUTLS_E_NO_CERTIFICATE_FOUND)
-   {
-     mutt_error (_("Unable to get certificate from peer"));
-     mutt_sleep (2);
-     return 0;
-   }
--  if (certstat < 0)
-+  if (verify_ret < 0)
-   {
-     mutt_error (_("Certificate verification error (%s)"),
--                gnutls_strerror (certstat));
-+                gnutls_strerror (status));
-     mutt_sleep (2);
-     return 0;
-   }
-@@ -988,7 +988,7 @@
-     return 0;
-   }
- 
--  return certstat;
-+  return status;
- }
- 
- static int tls_check_certificate (CONNECTION* conn)

++++++ mutt-1.5.21.dif -> mutt-1.5.23.dif ++++++


++++++ patch-1.5.23.sidebar.20140412.patch ++++++
++++ 2412 lines (skipped)

++++++ patch-1.5.23.xtitles.patch ++++++
From: Cristoph Berg <[email protected]>
Date: Thu, 27 Feb 2014 12:25:51 +0100
Subject: xtitles

This is the xterm title patch as found on the mutt mailing lists.

* Changes made:
  - 2007-01-27 myon: using %P caused a segfault, updated status.c to catch
    menu==NULL.
  - 2007-02-20 myon: make the note about the xterm_set_titles defaults a
    comment.
  - 2008-08-02 myon: move set_xterm_* prototypes into the proper header file
    (cleaner code, no functional change, evades conflict with sidebar patch)

Signed-off-by: Matteo F. Vescovi <[email protected]>

Gbp-Pq: Topic features
---
 curs_main.c | 20 ++++++++++++++++++++
 globals.h   |  2 ++
 init.c      | 20 ++++++++++++++++++++
 init.h      | 21 +++++++++++++++++++++
 mutt.h      |  1 +
 mutt_menu.h |  2 ++
 pager.c     |  7 +++++++
 status.c    |  2 ++
 8 files changed, 75 insertions(+)

diff --git a/curs_main.c b/curs_main.c
index aa4b044..16ddbc9 100644
--- a/curs_main.c
+++ b/curs_main.c
@@ -110,6 +110,19 @@ static const char *No_visible = N_("No visible messages.");
 
 extern size_t UngetCount;
 
+#define ASCII_CTRL_G                  0x07
+#define ASCII_CTRL_OPEN_SQUARE_BRAKET 0x1b
+
+void set_xterm_title_bar(char *title)
+{
+  fprintf(stderr ,"%c]2;%s%c", ASCII_CTRL_OPEN_SQUARE_BRAKET, title, 
ASCII_CTRL_G);
+}
+
+void set_xterm_icon_name(char *name)
+{
+  fprintf(stderr, "%c]1;%s%c", ASCII_CTRL_OPEN_SQUARE_BRAKET, name, 
ASCII_CTRL_G);
+}
+
 void index_make_entry (char *s, size_t l, MUTTMENU *menu, int num)
 {
   format_flag flag = M_FORMAT_MAKEPRINT | M_FORMAT_ARROWCURSOR | 
M_FORMAT_INDEX;
@@ -560,6 +573,13 @@ int mutt_index_menu (void)
        mutt_paddstr (COLS, buf);
        NORMAL_COLOR;
        menu->redraw &= ~REDRAW_STATUS;
+       if (option(OPTXTERMSETTITLES))
+       {
+         menu_status_line (buf, sizeof (buf), menu, NONULL (XtermTitle));
+         set_xterm_title_bar(buf);
+         menu_status_line (buf, sizeof (buf), menu, NONULL (XtermIcon));
+         set_xterm_icon_name(buf);
+       }
       }
 
       menu->redraw = 0;
diff --git a/globals.h b/globals.h
index 6fefe5b..584cd0c 100644
--- a/globals.h
+++ b/globals.h
@@ -141,6 +141,8 @@ WHERE char *Tempdir;
 WHERE char *Tochars;
 WHERE char *Username;
 WHERE char *Visual;
+WHERE char *XtermTitle;
+WHERE char *XtermIcon;
 
 WHERE char *CurrentFolder;
 WHERE char *LastFolder;
diff --git a/init.c b/init.c
index cc3cf4b..81bb9e7 100644
--- a/init.c
+++ b/init.c
@@ -1877,6 +1877,26 @@ static int parse_set (BUFFER *tmp, BUFFER *s, unsigned 
long data, BUFFER *err)
        toggle_option (MuttVars[idx].data);
       else
        set_option (MuttVars[idx].data);
+
+      /* sanity check for xterm */
+      if ((mutt_strcmp (MuttVars[idx].option, "xterm_set_titles") == 0)
+               && option (OPTXTERMSETTITLES))
+      {
+       char *ep = getenv ("TERM");
+       /* Make sure that the terminal can take the control codes */
+       if (ep == NULL) unset_option (MuttVars[idx].data);
+       else if (mutt_strncasecmp (ep, "xterm", 5) &&
+                mutt_strncasecmp (ep, "color-xterm", 11) &&
+                mutt_strncasecmp (ep, "eterm", 5) &&
+                mutt_strncasecmp (ep, "kterm", 5) &&
+                mutt_strncasecmp (ep, "nxterm", 6) &&
+                mutt_strncasecmp (ep, "putty", 5) &&
+                mutt_strncasecmp (ep, "screen", 6) &&
+                mutt_strncasecmp (ep, "cygwin", 6) &&
+                mutt_strncasecmp (ep, "rxvt", 4) )
+         unset_option (MuttVars[idx].  data);
+
+      }
     }
     else if (myvar || DTYPE (MuttVars[idx].type) == DT_STR ||
             DTYPE (MuttVars[idx].type) == DT_PATH ||
diff --git a/init.h b/init.h
index 80d05ce..cf8e75a 100644
--- a/init.h
+++ b/init.h
@@ -3412,6 +3412,27 @@ struct option_t MuttVars[] = {
   ** Also see the $$read_inc, $$net_inc and $$time_inc variables and the
   ** ``$tuning'' section of the manual for performance considerations.
   */
+  {"xterm_icon",       DT_STR,   R_BOTH, UL &XtermIcon,  UL "M%?n?AIL&ail?"},
+  /*
+  ** .pp
+  ** Controls the format of the icon title, as long as xterm_set_titles
+  ** is enabled. This string is identical in formatting to the one used by
+  ** ``$$status_format''.
+  */
+  {"xterm_set_titles", DT_BOOL,  R_BOTH, OPTXTERMSETTITLES, 0},
+  /* The default must be off to force in the validity checking. */
+  /*
+  ** .pp
+  ** Controls whether mutt sets the xterm title bar and icon name
+  ** (as long as you are in an appropriate terminal).
+  */
+  {"xterm_title",      DT_STR,   R_BOTH, UL &XtermTitle, UL "Mutt with %?m?%m 
messages&no messages?%?n? [%n NEW]?"},
+  /*
+  ** .pp
+  ** Controls the format of the title bar of the xterm provided that
+  ** xterm_set_titles has been set. This string is identical in formatting
+  ** to the one used by ``$$status_format''.
+  */
   /*--*/
   { NULL, 0, 0, 0, 0 }
 };
diff --git a/mutt.h b/mutt.h
index dcd7dc5..1d7e177 100644
--- a/mutt.h
+++ b/mutt.h
@@ -449,6 +449,7 @@ enum
   OPTWRAPSEARCH,
   OPTWRITEBCC,         /* write out a bcc header? */
   OPTXMAILER,
+  OPTXTERMSETTITLES,
 
   OPTCRYPTUSEGPGME,
   OPTCRYPTUSEPKA,
diff --git a/mutt_menu.h b/mutt_menu.h
index d459bef..82abecd 100644
--- a/mutt_menu.h
+++ b/mutt_menu.h
@@ -103,6 +103,8 @@ void menu_current_middle (MUTTMENU *);
 void menu_current_bottom (MUTTMENU *);
 void menu_check_recenter (MUTTMENU *);
 void menu_status_line (char *, size_t, MUTTMENU *, const char *);
+void set_xterm_title_bar (char *title);
+void set_xterm_icon_name (char *name);
 
 MUTTMENU *mutt_new_menu (int);
 void mutt_menuDestroy (MUTTMENU **);
diff --git a/pager.c b/pager.c
index 486d8c8..23eb8ca 100644
--- a/pager.c
+++ b/pager.c
@@ -1812,6 +1812,13 @@ mutt_pager (const char *banner, const char *fname, int 
flags, pager_t *extra)
        mutt_paddstr (COLS, bn);
       }
       NORMAL_COLOR;
+      if (option(OPTXTERMSETTITLES))
+      {
+       menu_status_line (buffer, sizeof (buffer), index, NONULL (XtermTitle));
+       set_xterm_title_bar(buffer);
+       menu_status_line (buffer, sizeof (buffer), index, NONULL (XtermIcon));
+       set_xterm_icon_name(buffer);
+      }
     }
 
     if ((redraw & REDRAW_INDEX) && index)
diff --git a/status.c b/status.c
index 1bb9a5a..6051e3a 100644
--- a/status.c
+++ b/status.c
@@ -195,6 +195,8 @@ status_format_str (char *buf, size_t buflen, size_t col, 
char op, const char *sr
       break;
 
     case 'P':
+      if (!menu)
+       break;
       if (menu->top + menu->pagelen >= menu->max)
        cp = menu->top ? "end" : "all";
       else
-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to