From d7ad59d6f44300809857e3369836bd397ef7080d Mon Sep 17 00:00:00 2001 From: "Dr. Werner Fink" Date: Wed, 2 Jan 2019 14:21:18 +0000 Subject: [PATCH] Update to mutt 1.11.1 OBS-URL: https://build.opensuse.org/package/show/server:mail/mutt?expand=0&rev=193 --- aw.listreply.diff | 10 +- bsc907453-CVE-2014-9116-jessie.patch | 4 +- bug-676388-largefile.patch | 12 +- mutt-1.10.0.dif | 18 +- mutt-1.10.1-imap.patch | 16 ++ mutt-1.10.1.tar.gz | 3 - mutt-1.11.1.tar.gz | 3 + mutt-1.5.15-wrapcolumn.diff | 4 +- mutt-1.5.20-sendgroupreplyto.diff | 12 +- mutt-1.5.21-mailcap.diff | 4 +- mutt-1.5.23-carriage-return.path | 22 +- mutt-1.6.1-opennfs.dif | 55 ++-- mutt.changes | 50 ++++ mutt.spec | 33 ++- patch-1.5.24.vk.pgp_verbose_mime | 14 +- truncate.patch | 393 --------------------------- 16 files changed, 168 insertions(+), 485 deletions(-) create mode 100644 mutt-1.10.1-imap.patch delete mode 100644 mutt-1.10.1.tar.gz create mode 100644 mutt-1.11.1.tar.gz delete mode 100644 truncate.patch diff --git a/aw.listreply.diff b/aw.listreply.diff index 0c5d866..bcf8bb8 100644 --- a/aw.listreply.diff +++ b/aw.listreply.diff @@ -7,8 +7,8 @@ ask when sending list message replies to author only - Armin Wolfermann (aw) 3 files changed, 26 insertions(+) --- init.h -+++ init.h 2018-07-04 13:25:19.570925951 +0000 -@@ -1518,6 +1518,13 @@ struct option_t MuttVars[] = { ++++ init.h 2019-01-02 13:22:21.794925899 +0000 +@@ -1559,6 +1559,13 @@ struct option_t MuttVars[] = { ** from your spool mailbox to your $$mbox mailbox, or as a result of ** a ``$mbox-hook'' command. */ @@ -23,8 +23,8 @@ ask when sending list message replies to author only - Armin Wolfermann (aw) /* ** .pp --- mutt.h -+++ mutt.h 2018-07-04 13:24:58.147315807 +0000 -@@ -311,6 +311,7 @@ enum ++++ mutt.h 2019-01-02 13:22:21.794925899 +0000 +@@ -320,6 +320,7 @@ enum #endif OPT_SUBJECT, OPT_VERIFYSIG, /* verify PGP signatures */ @@ -33,7 +33,7 @@ ask when sending list message replies to author only - Armin Wolfermann (aw) /* THIS MUST BE THE LAST VALUE. */ OPT_MAX --- send.c -+++ send.c 2018-07-04 13:28:46.211165353 +0000 ++++ send.c 2019-01-02 13:22:21.794925899 +0000 @@ -448,6 +448,7 @@ static int include_reply (CONTEXT *ctx, static int default_to (ADDRESS **to, ENVELOPE *env, int flags, int hmfupto) { diff --git a/bsc907453-CVE-2014-9116-jessie.patch b/bsc907453-CVE-2014-9116-jessie.patch index a429006..2013ad2 100644 --- a/bsc907453-CVE-2014-9116-jessie.patch +++ b/bsc907453-CVE-2014-9116-jessie.patch @@ -17,8 +17,8 @@ Index: mutt/lib.c 1 file changed, 3 insertions(+) --- lib.c -+++ lib.c 2018-07-05 08:26:51.564728125 +0000 -@@ -819,6 +819,9 @@ char *mutt_substrdup (const char *begin, ++++ lib.c 2019-01-02 13:25:44.767193676 +0000 +@@ -851,6 +851,9 @@ char *mutt_substrdup (const char *begin, size_t len; char *p; diff --git a/bug-676388-largefile.patch b/bug-676388-largefile.patch index 14e1066..8dedd76 100644 --- a/bug-676388-largefile.patch +++ b/bug-676388-largefile.patch @@ -4,10 +4,10 @@ 2 files changed, 4 insertions(+), 4 deletions(-) --- mh.c -+++ mh.c 2018-07-04 12:55:15.079790270 +0000 -@@ -1735,9 +1735,9 @@ static int mh_rewrite_message (CONTEXT * - char newpath[_POSIX_PATH_MAX]; - char partpath[_POSIX_PATH_MAX]; ++++ mh.c 2019-01-02 13:20:40.204793251 +0000 +@@ -1809,9 +1809,9 @@ static int mh_rewrite_message (CONTEXT * + BUFFER *newpath = NULL; + BUFFER *partpath = NULL; - long old_body_offset = h->content->offset; - long old_body_length = h->content->length; @@ -19,8 +19,8 @@ if ((dest = mx_open_new_message (ctx, h, 0)) == NULL) return -1; --- mutt.h -+++ mutt.h 2018-07-04 12:54:40.604418656 +0000 -@@ -690,7 +690,7 @@ typedef struct body ++++ mutt.h 2019-01-02 13:19:38.181933079 +0000 +@@ -702,7 +702,7 @@ typedef struct body PARAMETER *parameter; /* parameters of the content-type */ char *description; /* content-description */ char *form_name; /* Content-Disposition form-data name param */ diff --git a/mutt-1.10.0.dif b/mutt-1.10.0.dif index 0c38d27..793d2c6 100644 --- a/mutt-1.10.0.dif +++ b/mutt-1.10.0.dif @@ -6,7 +6,7 @@ 4 files changed, 39 insertions(+), 6 deletions(-) --- configure.ac -+++ configure.ac 2018-07-04 11:58:54.469266378 +0000 ++++ configure.ac 2019-01-02 13:03:11.384049677 +0000 @@ -257,7 +257,7 @@ main () mutt_cv_slang=$withval if test -d $withval/include/slang; then @@ -16,7 +16,7 @@ CPPFLAGS="$CPPFLAGS -I${withval}/include" fi LDFLAGS="$LDFLAGS -L${withval}/lib" -@@ -700,8 +700,12 @@ AC_ARG_WITH(ssl, AS_HELP_STRING([--with- +@@ -727,8 +727,12 @@ AC_ARG_WITH(ssl, AS_HELP_STRING([--with- else if test "$with_ssl" != "yes" then @@ -31,7 +31,7 @@ fi saved_LIBS="$LIBS" -@@ -788,8 +792,12 @@ AC_ARG_WITH(sasl, AS_HELP_STRING([--with +@@ -815,8 +819,12 @@ AC_ARG_WITH(sasl, AS_HELP_STRING([--with if test "$with_sasl" != "yes" then @@ -47,7 +47,7 @@ saved_LIBS="$LIBS" --- doc/Muttrc.head -+++ doc/Muttrc.head 2018-07-04 11:53:27.427203358 +0000 ++++ doc/Muttrc.head 2019-01-02 13:03:11.384049677 +0000 @@ -23,7 +23,7 @@ macro index,pager,attach,compose \cb "\ "call urlview to extract URLs out of a message" @@ -58,8 +58,8 @@ # show the incoming mailboxes list (just like "mutt -y") and back when pressing "y" macro index y "?" "show incoming mailboxes list" --- imap/auth.c -+++ imap/auth.c 2018-07-04 11:52:06.288675786 +0000 -@@ -72,6 +72,25 @@ int imap_authenticate (IMAP_DATA* idata) ++++ imap/auth.c 2019-01-02 13:03:11.384049677 +0000 +@@ -73,6 +73,25 @@ int imap_authenticate (IMAP_DATA* idata) dprint (2, (debugfile, "imap_authenticate: Trying method %s\n", method)); authenticator = imap_authenticators; @@ -85,7 +85,7 @@ while (authenticator->authenticate) { if (!authenticator->method || -@@ -85,6 +104,9 @@ int imap_authenticate (IMAP_DATA* idata) +@@ -86,6 +105,9 @@ int imap_authenticate (IMAP_DATA* idata) authenticator++; } @@ -96,8 +96,8 @@ FREE (&methods); --- mx.c -+++ mx.c 2018-07-04 11:24:07.179272240 +0000 -@@ -1400,6 +1400,9 @@ void mx_update_context (CONTEXT *ctx, in ++++ mx.c 2019-01-02 13:03:11.384049677 +0000 +@@ -1435,6 +1435,9 @@ void mx_update_context (CONTEXT *ctx, in { h = ctx->hdrs[msgno]; diff --git a/mutt-1.10.1-imap.patch b/mutt-1.10.1-imap.patch new file mode 100644 index 0000000..c76d145 --- /dev/null +++ b/mutt-1.10.1-imap.patch @@ -0,0 +1,16 @@ +--- browser.c ++++ browser.c 2018-08-10 11:15:47.527515218 +0200 +@@ -893,6 +893,13 @@ void _mutt_select_file (char *f, size_t + { + strfcpy (f, state.entry[menu->current].name, flen); + mutt_expand_path (f, flen); ++#ifdef USE_IMAP ++ if (mx_is_imap(f)) ++ { ++ strfcpy (LastDir, f, sizeof (LastDir)); ++ state.imap_browse = 1; ++ } ++#endif + } + #ifdef USE_IMAP + else if (state.imap_browse) diff --git a/mutt-1.10.1.tar.gz b/mutt-1.10.1.tar.gz deleted file mode 100644 index 4e6b29d..0000000 --- a/mutt-1.10.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:734a3883158ec3d180cf6538d8bd7f685ce641d2cdef657aa0038f76e79a54a0 -size 4255890 diff --git a/mutt-1.11.1.tar.gz b/mutt-1.11.1.tar.gz new file mode 100644 index 0000000..26bdd39 --- /dev/null +++ b/mutt-1.11.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:705141013662e53b78e49ed545360281f30a09ddda908f4de733277a60b1db05 +size 4579062 diff --git a/mutt-1.5.15-wrapcolumn.diff b/mutt-1.5.15-wrapcolumn.diff index 2b72fab..71960cf 100644 --- a/mutt-1.5.15-wrapcolumn.diff +++ b/mutt-1.5.15-wrapcolumn.diff @@ -5,8 +5,8 @@ Index: init.h 1 file changed, 1 insertion(+) --- init.h -+++ init.h 2018-07-04 12:19:10.323191976 +0000 -@@ -3968,6 +3968,7 @@ struct option_t MuttVars[] = { ++++ init.h 2019-01-02 13:04:23.746719029 +0000 +@@ -4032,6 +4032,7 @@ struct option_t MuttVars[] = { ** printing, or replying to messages. */ { "wrap", DT_NUM, R_PAGER, UL &Wrap, 0 }, diff --git a/mutt-1.5.20-sendgroupreplyto.diff b/mutt-1.5.20-sendgroupreplyto.diff index 1870aeb..fa9fd97 100644 --- a/mutt-1.5.20-sendgroupreplyto.diff +++ b/mutt-1.5.20-sendgroupreplyto.diff @@ -5,8 +5,8 @@ 3 files changed, 18 insertions(+), 2 deletions(-) --- init.h -+++ init.h 2018-07-04 12:14:37.508148148 +0000 -@@ -2809,6 +2792,13 @@ struct option_t MuttVars[] = { ++++ init.h 2019-01-02 13:03:50.043338815 +0000 +@@ -2864,6 +2864,13 @@ struct option_t MuttVars[] = { ** .pp ** Also see the $$force_name variable. */ @@ -21,8 +21,8 @@ /* ** .pp --- mutt.h -+++ mutt.h 2018-07-04 12:14:07.560692103 +0000 -@@ -468,6 +468,7 @@ enum ++++ mutt.h 2019-01-02 13:03:50.043338815 +0000 +@@ -480,6 +480,7 @@ enum OPTSAVEADDRESS, OPTSAVEEMPTY, OPTSAVENAME, @@ -31,8 +31,8 @@ #ifdef USE_SIDEBAR OPTSIDEBAR, --- send.c -+++ send.c 2018-07-04 12:15:43.734945139 +0000 -@@ -557,8 +557,16 @@ int mutt_fetch_recips (ENVELOPE *out, EN ++++ send.c 2019-01-02 13:03:50.043338815 +0000 +@@ -559,8 +559,16 @@ int mutt_fetch_recips (ENVELOPE *out, EN if ((flags & SENDGROUPREPLY) && (!in->mail_followup_to || hmfupto != MUTT_YES)) { /* if(!mutt_addr_is_user(in->to)) */ diff --git a/mutt-1.5.21-mailcap.diff b/mutt-1.5.21-mailcap.diff index bf81841..41ed54f 100644 --- a/mutt-1.5.21-mailcap.diff +++ b/mutt-1.5.21-mailcap.diff @@ -8,8 +8,8 @@ Index: mutt-1.5.21/init.c 1 file changed, 1 insertion(+), 1 deletion(-) --- init.c -+++ init.c 2018-07-05 08:23:55.663914846 +0000 -@@ -3464,7 +3464,7 @@ void mutt_init (int skip_sys_rc, LIST *c ++++ init.c 2019-01-02 13:25:20.795634552 +0000 +@@ -3519,7 +3519,7 @@ void mutt_init (int skip_sys_rc, LIST *c else { /* Default search path from RFC1524 */ diff --git a/mutt-1.5.23-carriage-return.path b/mutt-1.5.23-carriage-return.path index 1698dcf..0fb496f 100644 --- a/mutt-1.5.23-carriage-return.path +++ b/mutt-1.5.23-carriage-return.path @@ -7,8 +7,8 @@ 5 files changed, 26 insertions(+), 14 deletions(-) --- crypt-gpgme.c -+++ crypt-gpgme.c 2018-07-17 09:39:04.969728233 +0000 -@@ -2335,7 +2335,7 @@ static void copy_clearsigned (gpgme_data ++++ crypt-gpgme.c 2019-01-02 13:24:40.244380302 +0000 +@@ -2338,7 +2338,7 @@ static void copy_clearsigned (gpgme_data if (armor_header) { @@ -18,8 +18,8 @@ continue; } --- lib.c -+++ lib.c 2018-07-17 09:39:04.969728233 +0000 -@@ -875,6 +875,17 @@ int mutt_strcmp(const char *a, const cha ++++ lib.c 2019-01-02 13:24:40.244380302 +0000 +@@ -907,6 +907,17 @@ int mutt_strcmp(const char *a, const cha return strcmp(NONULL(a), NONULL(b)); } @@ -38,8 +38,8 @@ { return strcasecmp(NONULL(a), NONULL(b)); --- lib.h -+++ lib.h 2018-07-17 09:39:04.969728233 +0000 -@@ -203,6 +203,7 @@ int mutt_copy_bytes (FILE *, FILE *, siz ++++ lib.h 2019-01-02 13:24:40.244380302 +0000 +@@ -204,6 +204,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 *); @@ -48,8 +48,8 @@ int mutt_strncmp (const char *, const char *, size_t); int mutt_strcoll (const char *, const char *); --- pager.c -+++ pager.c 2018-07-17 09:39:04.969728233 +0000 -@@ -785,7 +785,7 @@ resolve_types (char *buf, char *raw, str ++++ pager.c 2019-01-02 13:24:40.244380302 +0000 +@@ -823,7 +823,7 @@ resolve_types (char *buf, char *raw, str else if (check_attachment_marker ((char *) raw) == 0) lineInfo[n].type = MT_COLOR_ATTACHMENT; #endif @@ -59,7 +59,7 @@ i = n + 1; --- pgp.c -+++ pgp.c 2018-07-17 09:41:08.907482460 +0000 ++++ pgp.c 2019-01-02 13:24:40.244380302 +0000 @@ -373,7 +373,7 @@ static void pgp_copy_clearsigned (FILE * continue; } @@ -101,7 +101,7 @@ break; /* remember optional Charset: armor header as defined by RfC4880 */ if (mutt_strncmp ("Charset: ", buf, 9) == 0) -@@ -736,11 +736,11 @@ static int pgp_check_traditional_one_bod +@@ -740,11 +740,11 @@ static int pgp_check_traditional_one_bod { if (mutt_strncmp ("-----BEGIN PGP ", buf, 15) == 0) { @@ -116,7 +116,7 @@ key = 1; } } -@@ -1228,9 +1228,9 @@ BODY *pgp_sign_message (BODY *a) +@@ -1232,9 +1232,9 @@ BODY *pgp_sign_message (BODY *a) */ while (fgets (buffer, sizeof (buffer) - 1, pgpout) != NULL) { diff --git a/mutt-1.6.1-opennfs.dif b/mutt-1.6.1-opennfs.dif index 82cb1c1..56d4f26 100644 --- a/mutt-1.6.1-opennfs.dif +++ b/mutt-1.6.1-opennfs.dif @@ -2,14 +2,14 @@ Makefile.am | 4 - lib.c | 8 ++- mbox.c | 5 ++ - mh.c | 8 +++ + mh.c | 9 +++- mutt.h | 3 + opennfs.c | 122 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ sendlib.c | 4 + - 7 files changed, 150 insertions(+), 4 deletions(-) + 7 files changed, 150 insertions(+), 5 deletions(-) --- Makefile.am -+++ Makefile.am 2018-07-04 12:36:51.255902140 +0000 ++++ Makefile.am 2019-01-02 13:10:35.863891779 +0000 @@ -32,7 +32,7 @@ mutt_SOURCES = \ edit.c enter.c flags.c init.c filter.c from.c \ getdomain.c group.c \ @@ -19,17 +19,17 @@ postpone.c query.c recvattach.c recvcmd.c \ rfc822.c rfc1524.c rfc2047.c rfc2231.c rfc3676.c \ score.c send.c sendlib.c signal.c sort.c \ -@@ -85,7 +85,7 @@ mutt_dotlock_SOURCES = mutt_dotlock.c +@@ -86,7 +86,7 @@ mutt_dotlock_SOURCES = mutt_dotlock.c mutt_dotlock_LDADD = $(LIBOBJS) mutt_dotlock_DEPENDENCIES = $(LIBOBJS) --pgpring_SOURCES = pgppubring.c pgplib.c lib.c extlib.c sha1.c md5.c pgppacket.c ascii.c -+pgpring_SOURCES = opennfs.c pgppubring.c pgplib.c lib.c extlib.c sha1.c md5.c pgppacket.c ascii.c - pgpring_LDADD = $(LIBOBJS) $(INTLLIBS) - pgpring_DEPENDENCIES = $(LIBOBJS) $(INTLDEPS) +-mutt_pgpring_SOURCES = pgppubring.c pgplib.c lib.c extlib.c sha1.c md5.c pgppacket.c ascii.c ++mutt_pgpring_SOURCES = opennfs.c pgppubring.c pgplib.c lib.c extlib.c sha1.c md5.c pgppacket.c ascii.c + mutt_pgpring_LDADD = $(LIBOBJS) $(INTLLIBS) + mutt_pgpring_DEPENDENCIES = $(LIBOBJS) $(INTLDEPS) --- lib.c -+++ lib.c 2018-07-04 12:52:11.255140696 +0000 ++++ lib.c 2019-01-02 13:10:35.863891779 +0000 @@ -50,9 +50,9 @@ #define EX_OK 0 #endif @@ -41,7 +41,7 @@ static const struct sysexits { int v; -@@ -633,6 +633,10 @@ int safe_open (const char *path, int fla +@@ -665,6 +665,10 @@ int safe_open (const char *path, int fla struct stat osb, nsb; int fd; @@ -52,7 +52,7 @@ if (flags & O_EXCL) { char safe_file[_POSIX_PATH_MAX]; -@@ -656,7 +660,7 @@ int safe_open (const char *path, int fla +@@ -688,7 +692,7 @@ int safe_open (const char *path, int fla if ((fd = open (path, flags & ~O_EXCL, 0600)) < 0) return fd; @@ -62,8 +62,8 @@ if (lstat (path, &osb) < 0 || fstat (fd, &nsb) < 0 || compare_stat(&osb, &nsb) == -1) --- mbox.c -+++ mbox.c 2018-07-04 12:42:52.949313860 +0000 -@@ -867,8 +867,13 @@ static int mbox_sync_mailbox (CONTEXT *c ++++ mbox.c 2019-01-02 13:10:35.867891705 +0000 +@@ -889,8 +889,13 @@ static int mbox_sync_mailbox (CONTEXT *c /* Create a temporary file to write the new version of the mailbox in. */ mutt_mktemp (tempfile, sizeof (tempfile)); @@ -78,34 +78,35 @@ if (-1 != i) { --- mh.c -+++ mh.c 2018-07-04 12:46:06.973778914 +0000 -@@ -357,7 +357,11 @@ static int mh_mkstemp (CONTEXT * dest, F ++++ mh.c 2019-01-02 13:10:35.867891705 +0000 +@@ -369,7 +369,11 @@ static int mh_mkstemp (CONTEXT * dest, F { - snprintf (path, _POSIX_PATH_MAX, "%s/.mutt-%s-%d-%d", + mutt_buffer_printf (path, "%s/.mutt-%s-%d-%d", dest->path, NONULL (Hostname), (int) getpid (), Counter++); +#if defined(__linux__) -+ if ((fd = opennfs(path, O_WRONLY | O_EXCL | O_CREAT, 0666)) == -1) ++ if ((fd = opennfs(mutt_b2s (path), O_WRONLY | O_EXCL | O_CREAT, 0666)) == -1) +#else - if ((fd = open (path, O_WRONLY | O_EXCL | O_CREAT, 0666)) == -1) + if ((fd = open (mutt_b2s (path), O_WRONLY | O_EXCL | O_CREAT, 0666)) == -1) +#endif { if (errno != EEXIST) { -@@ -1496,7 +1500,11 @@ static int maildir_open_new_message (MES - dprint (2, (debugfile, "maildir_open_new_message (): Trying %s.\n", - path)); +@@ -1548,8 +1552,11 @@ static int maildir_open_new_message (MES + dprint (2, (debugfile, "maildir_open_new_message (): Trying %s.\n", + mutt_b2s (path))); +- +#if defined(__linux__) -+ if ((fd = opennfs(path, O_WRONLY | O_EXCL | O_CREAT, 0666)) == -1) ++ if ((fd = opennfs(mutt_b2s (path), O_WRONLY | O_EXCL | O_CREAT, 0666)) == -1) +#else - if ((fd = open (path, O_WRONLY | O_EXCL | O_CREAT, 0666)) == -1) + if ((fd = open (mutt_b2s (path), O_WRONLY | O_EXCL | O_CREAT, 0666)) == -1) +#endif { if (errno != EEXIST) { --- mutt.h -+++ mutt.h 2018-07-04 12:50:36.504867472 +0000 -@@ -1087,4 +1087,7 @@ typedef struct ++++ mutt.h 2019-01-02 13:10:35.867891705 +0000 +@@ -1102,4 +1102,7 @@ typedef struct #include "lib.h" #include "globals.h" @@ -114,7 +115,7 @@ +#endif #endif /*MUTT_H*/ --- opennfs.c -+++ opennfs.c 2018-07-04 12:19:44.426572384 +0000 ++++ opennfs.c 2019-01-02 13:10:35.867891705 +0000 @@ -0,0 +1,122 @@ +#include +#include @@ -239,7 +240,7 @@ + return open(path, flags, mode); +} --- sendlib.c -+++ sendlib.c 2018-07-04 12:47:53.063845836 +0000 ++++ sendlib.c 2019-01-02 13:10:35.867891705 +0000 @@ -2256,7 +2256,11 @@ send_msg (const char *path, char **args, if (SendmailWait >= 0 && tempfile && *tempfile) { diff --git a/mutt.changes b/mutt.changes index dcd8ab9..538a6bb 100644 --- a/mutt.changes +++ b/mutt.changes @@ -1,3 +1,53 @@ +------------------------------------------------------------------- +Wed Jan 2 14:14:18 UTC 2019 - Dr. Werner Fink + +- Update to mutt 1.11.1 + * Bug fix release. + * IMAP retrieves the Sender header by default. It doesn't need to be added + to $imap_headers. + * inotify is used for local mailbox monitoring on Linux. Configuration flag + --disable-filemonitor turns this off. + * OAUTHBEARER support for IMAP, SMTP and POP via + $imap_oauth_refresh_command, $smtp_oauth_refresh_command, and + $pop_oauth_refresh_command. + * $pgp_timeout and $smime_timeout support 32-bit numbers. + * manually updates mailbox statistics, the same way + $mail_check_stats does when set. + * Thread limited views, e.g. ~(pattern), now show new mail as it arrives. + * Command line argument -z and -Z options also work for IMAP mailboxes. + * $imap_condstore and $imap_qresync enable IMAP CONDSTORE and QRESYNC + support, respectively. QRESYNC should provide much faster mailbox opening. + * $abort_noattach skips quoted lines (as defined by $quote_regexp and + $smileys). + * Initial IMAP header downloading can be aborted with ctrl-c. + * composes a message to the sender of the selected + message, in the index or attachment menu. + * Address book queries ($query_format) now support multibyte characters. + * Finnish translation. + * pgpring has been renamed to mutt_pgpring. + * Certificate prompts show sha-256 instead of md5 fingerprints. + * Non-threaded $sort_aux "reverse-" settings now work properly. + * The manual can be generated and installed in GNU Info format. + * index-format-hook and the new %@name@ expando for $index_format enable + dynamic index formats using pattern matching against the current message. + This can be used, for example, to format dates based on the age of + the message. + * Relative date matching allows hour, minute, and second units: HMS. +- Remove patch truncate.patch as it seems to be superfluous now +- Add patch mutt-1.10.1-imap.patch to enable mutt to change imap folders +- Modify the patches + * aw.listreply.diff + * bsc907453-CVE-2014-9116-jessie.patch + * bug-676388-largefile.patch + * mutt-1.10.0.dif + * mutt-1.5.15-wrapcolumn.diff + * mutt-1.5.20-sendgroupreplyto.diff + * mutt-1.5.21-mailcap.diff + * mutt-1.5.23-carriage-return.path + * mutt-1.6.1-opennfs.dif + * mutt.spec + * patch-1.5.24.vk.pgp_verbose_mime + ------------------------------------------------------------------- Tue Jul 17 09:46:59 UTC 2018 - werner@suse.de diff --git a/mutt.spec b/mutt.spec index 4c03910..de0d042 100644 --- a/mutt.spec +++ b/mutt.spec @@ -1,7 +1,7 @@ # # spec file for package mutt # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -61,6 +61,8 @@ BuildRequires: update-desktop-files %endif BuildRequires: w3m Url: http://www.mutt.org +Requires(post): %install_info_prereq +Requires(preun): %install_info_prereq Recommends: hunspell Provides: muttssl Obsoletes: muttssl @@ -73,7 +75,7 @@ Recommends: w3m Requires(post): shared-mime-info Requires(postun): shared-mime-info %endif -Version: 1.10.1 +Version: 1.11.1 Release: 0 Summary: Mail Program # ftp://ftp.mutt.org/mutt/devel/ @@ -105,8 +107,8 @@ Patch16: mutt-1.5.23-carriage-return.path Patch18: mutt-1.5.21-mailcap.diff # PATCH-FIX-SUSE: bsc#907453 - CVE-2014-9116: mutt: heap-based buffer overflow in mutt_substrdup() Patch19: bsc907453-CVE-2014-9116-jessie.patch -# PATCH-FIX-SUSE: Silent gcc about truncated buffer with snprintf() -Patch20: truncate.patch +# PATCH-ENHANCE-SUSE: allow to list current imap folders +Patch20: mutt-1.10.1-imap.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %global _sysconfdir %{_sysconfdir} @@ -152,7 +154,7 @@ Provides translations to the package mutt. %patch16 -p0 -b .crlf %patch18 -p0 -b .mailcap %patch19 -p0 -b .cvw2014.9116 -%patch20 -p0 -b .trc +%patch20 -p0 -b .imap cp %{S:2} . @@ -277,6 +279,12 @@ install -D -m 644 doc/manual.txt.gz %{buildroot}%{_docdir}/%name/ %postun %mime_database_postun + +%post doc +%install_info --info-dir=%{_infodir} "%{_infodir}/mutt.info.gz" + +%preun doc +%install_info_delete --info-dir=%{_infodir} "%{_infodir}/mutt.info.gz" %endif %files @@ -285,17 +293,17 @@ install -D -m 644 doc/manual.txt.gz %{buildroot}%{_docdir}/%name/ %config(noreplace) %{_sysconfdir}/Muttrc %{_bindir}/mutt %{_bindir}/pgpewrap -%{_bindir}/pgpring +%{_bindir}/mutt_pgpring %{_bindir}/smime_keys %{_bindir}/Signature_conversion %{_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 -%{_mandir}/man5/mbox_mutt.5.gz +%{_mandir}/man1/mutt.1%{ext_man} +%{_mandir}/man1/*pgp*.1%{ext_man} +%{_mandir}/man1/smime_keys.1%{ext_man} +%{_mandir}/man5/mmdf_mutt.5%{ext_man} +%{_mandir}/man5/muttrc.5%{ext_man} +%{_mandir}/man5/mbox_mutt.5%{ext_man} %dir %{_datadir}/mutt/ %{_datadir}/mutt/mailcap %dir %doc %{_docdir}/%name/ @@ -320,6 +328,7 @@ install -D -m 644 doc/manual.txt.gz %{buildroot}%{_docdir}/%name/ %doc %{_docdir}/%name/samples/smime_keys_test.pl %dir %doc %{_docdir}/%name/samples/iconv/ %doc %{_docdir}/%name/samples/iconv/*.rc +%doc %{_infodir}/*.gz %files lang -f %name.lang %defattr(-,root,root) diff --git a/patch-1.5.24.vk.pgp_verbose_mime b/patch-1.5.24.vk.pgp_verbose_mime index c6e08b1..b451411 100644 --- a/patch-1.5.24.vk.pgp_verbose_mime +++ b/patch-1.5.24.vk.pgp_verbose_mime @@ -5,10 +5,10 @@ 3 files changed, 16 insertions(+), 4 deletions(-) --- globals.h -+++ globals.h 2018-07-04 13:31:23.664299582 +0000 -@@ -256,6 +256,8 @@ WHERE char *PgpDefaultKey; ++++ globals.h 2019-01-02 13:23:50.937286980 +0000 +@@ -259,6 +259,8 @@ WHERE char *PgpDefaultKey; WHERE char *PgpSignAs; - WHERE short PgpTimeout; + WHERE long PgpTimeout; WHERE char *PgpEntryFormat; +WHERE char *PgpMimeSignatureFilename; +WHERE char *PgpMimeSignatureDescription; @@ -16,8 +16,8 @@ WHERE char *PgpDecodeCommand; WHERE char *PgpVerifyCommand; --- init.h -+++ init.h 2018-07-04 13:34:46.696603852 +0000 -@@ -3107,9 +3107,18 @@ struct option_t MuttVars[] = { ++++ init.h 2019-01-02 13:22:43.822520945 +0000 +@@ -3162,9 +3162,18 @@ struct option_t MuttVars[] = { ** a line quoted text if it also matches $$smileys. This mostly ** happens at the beginning of a line. */ @@ -40,8 +40,8 @@ /* ** .pp --- pgp.c -+++ pgp.c 2018-07-04 13:37:32.013594333 +0000 -@@ -1292,7 +1292,8 @@ BODY *pgp_sign_message (BODY *a) ++++ pgp.c 2019-01-02 13:22:43.822520945 +0000 +@@ -1296,7 +1296,8 @@ BODY *pgp_sign_message (BODY *a) t->disposition = DISPNONE; t->encoding = ENC7BIT; t->unlink = 1; /* ok to remove this file after sending. */ diff --git a/truncate.patch b/truncate.patch deleted file mode 100644 index 6e53285..0000000 --- a/truncate.patch +++ /dev/null @@ -1,393 +0,0 @@ ---- - bcache.c | 2 +- - browser.c | 6 +++--- - buffy.c | 4 ++-- - commands.c | 2 +- - imap/browse.c | 2 +- - imap/imap.c | 18 +++++++++--------- - imap/imap_private.h | 2 +- - imap/message.c | 2 +- - lib.c | 2 +- - lib.h | 2 +- - mh.c | 23 +++++++++++++---------- - mutt_sasl.c | 2 +- - mutt_ssl_gnutls.c | 18 +++++++++--------- - pager.c | 2 +- - pgppubring.c | 2 +- - smime.c | 2 +- - sort.c | 2 +- - 17 files changed, 48 insertions(+), 45 deletions(-) - ---- bcache.c -+++ bcache.c 2018-07-17 09:42:34.633928921 +0000 -@@ -128,7 +128,7 @@ FILE* mutt_bcache_get(body_cache_t *bcac - - FILE* mutt_bcache_put(body_cache_t *bcache, const char *id, int tmp) - { -- char path[_POSIX_PATH_MAX]; -+ char path[_POSIX_PATH_MAX+64]; - FILE* fp; - char* s; - struct stat sb; ---- browser.c -+++ browser.c 2018-07-17 09:42:34.633928921 +0000 -@@ -502,7 +502,7 @@ static int examine_directory (MUTTMENU * - static int examine_mailboxes (MUTTMENU *menu, struct browser_state *state) - { - struct stat s; -- char buffer[LONG_STRING]; -+ char buffer[LONG_STRING+16]; - BUFFY *tmp = Incoming; - - if (!Incoming) -@@ -548,7 +548,7 @@ static int examine_mailboxes (MUTTMENU * - if (mx_is_maildir (tmp->path)) - { - struct stat st2; -- char md[_POSIX_PATH_MAX]; -+ char md[_POSIX_PATH_MAX+16]; - - snprintf (md, sizeof (md), "%s/new", tmp->path); - if (stat (md, &s) < 0) -@@ -635,7 +635,7 @@ static int file_tag (MUTTMENU *menu, int - - void _mutt_select_file (char *f, size_t flen, int flags, char ***files, int *numfiles) - { -- char buf[_POSIX_PATH_MAX]; -+ char buf[_POSIX_PATH_MAX+16]; - char prefix[_POSIX_PATH_MAX] = ""; - char helpstr[LONG_STRING]; - char title[STRING]; ---- buffy.c -+++ buffy.c 2018-07-17 09:42:34.637928849 +0000 -@@ -313,8 +313,8 @@ int mutt_parse_mailboxes (BUFFER *path, - static int buffy_maildir_check_dir (BUFFY* mailbox, const char *dir_name, int check_new, - int check_stats) - { -- char path[_POSIX_PATH_MAX]; -- char msgpath[_POSIX_PATH_MAX]; -+ char path[2*_POSIX_PATH_MAX+8]; -+ char msgpath[2*_POSIX_PATH_MAX+8]; - DIR *dirp; - struct dirent *de; - char *p; ---- commands.c -+++ commands.c 2018-07-17 09:42:34.637928849 +0000 -@@ -241,7 +241,7 @@ int mutt_display_message (HEADER *cur) - - void ci_bounce_message (HEADER *h) - { -- char prompt[SHORT_STRING]; -+ char prompt[SHORT_STRING+16]; - char scratch[SHORT_STRING]; - char buf[HUGE_STRING] = { 0 }; - ADDRESS *adr = NULL; ---- imap/browse.c -+++ imap/browse.c 2018-07-17 09:42:34.637928849 +0000 -@@ -43,7 +43,7 @@ int imap_browse (char* path, struct brow - { - IMAP_DATA* idata; - IMAP_LIST list; -- char buf[LONG_STRING]; -+ char buf[LONG_STRING+64]; - char mbox[LONG_STRING]; - char munged_mbox[LONG_STRING]; - char list_cmd[5]; ---- imap/imap.c -+++ imap/imap.c 2018-07-17 09:44:01.836348503 +0000 -@@ -59,7 +59,7 @@ int imap_access (const char* path) - { - IMAP_DATA* idata; - IMAP_MBOX mx; -- char buf[LONG_STRING]; -+ char buf[LONG_STRING+64]; - char mailbox[LONG_STRING]; - char mbox[LONG_STRING]; - int rc; -@@ -115,7 +115,7 @@ int imap_access (const char* path) - - int imap_create_mailbox (IMAP_DATA* idata, char* mailbox) - { -- char buf[LONG_STRING], mbox[LONG_STRING]; -+ char buf[LONG_STRING+16], mbox[LONG_STRING]; - - imap_munge_mbox_name (idata, mbox, sizeof (mbox), mailbox); - snprintf (buf, sizeof (buf), "CREATE %s", mbox); -@@ -133,7 +133,7 @@ int imap_rename_mailbox (IMAP_DATA* idat - { - char oldmbox[LONG_STRING]; - char newmbox[LONG_STRING]; -- char buf[LONG_STRING]; -+ char buf[2*LONG_STRING+64]; - - imap_munge_mbox_name (idata, oldmbox, sizeof (oldmbox), mx->mbox); - imap_munge_mbox_name (idata, newmbox, sizeof (newmbox), newname); -@@ -148,7 +148,7 @@ int imap_rename_mailbox (IMAP_DATA* idat - - int imap_delete_mailbox (CONTEXT* ctx, IMAP_MBOX mx) - { -- char buf[LONG_STRING], mbox[LONG_STRING]; -+ char buf[LONG_STRING+16], mbox[LONG_STRING]; - IMAP_DATA *idata; - - if (!ctx || !ctx->data) { -@@ -588,7 +588,7 @@ static int imap_open_mailbox (CONTEXT* c - IMAP_DATA *idata; - IMAP_STATUS* status; - char buf[LONG_STRING]; -- char bufout[LONG_STRING]; -+ char bufout[LONG_STRING+64]; - int count = 0; - IMAP_MBOX mx, pmx; - int rc; -@@ -1572,7 +1572,7 @@ int imap_buffy_check (int force, int che - IMAP_DATA* lastdata = NULL; - BUFFY* mailbox; - char name[LONG_STRING]; -- char command[LONG_STRING]; -+ char command[LONG_STRING+64]; - char munged[LONG_STRING]; - int buffies = 0; - -@@ -1663,7 +1663,7 @@ int imap_status (char* path, int queue) - static int queued = 0; - - IMAP_DATA *idata; -- char buf[LONG_STRING]; -+ char buf[LONG_STRING+64]; - char mbox[LONG_STRING]; - IMAP_STATUS* status; - -@@ -1927,7 +1927,7 @@ int imap_search (CONTEXT* ctx, const pat - int imap_subscribe (char *path, int subscribe) - { - IMAP_DATA *idata; -- char buf[LONG_STRING]; -+ char buf[LONG_STRING+64]; - char mbox[LONG_STRING]; - char errstr[STRING]; - int mblen; -@@ -2057,7 +2057,7 @@ imap_complete_hosts (char *dest, size_t - int imap_complete(char* dest, size_t dlen, char* path) { - IMAP_DATA* idata; - char list[LONG_STRING]; -- char buf[LONG_STRING]; -+ char buf[LONG_STRING+64]; - IMAP_LIST listresp; - char completion[LONG_STRING]; - int clen; ---- imap/imap_private.h -+++ imap/imap_private.h 2018-07-17 09:42:34.641928776 +0000 -@@ -73,7 +73,7 @@ - #define IMAP_CMD_POLL (1<<3) - - /* length of "DD-MMM-YYYY HH:MM:SS +ZZzz" (null-terminated) */ --#define IMAP_DATELEN 27 -+#define IMAP_DATELEN 37 - - enum - { ---- imap/message.c -+++ imap/message.c 2018-07-17 09:42:34.641928776 +0000 -@@ -753,7 +753,7 @@ int imap_append_message (CONTEXT *ctx, M - { - IMAP_DATA* idata; - FILE *fp; -- char buf[LONG_STRING]; -+ char buf[LONG_STRING+IMAP_DATELEN+SHORT_STRING+64]; - char mbox[LONG_STRING]; - char mailbox[LONG_STRING]; - char internaldate[IMAP_DATELEN]; ---- lib.c -+++ lib.c 2018-07-17 09:42:34.637928849 +0000 -@@ -583,7 +583,7 @@ int mutt_rmtree (const char* path) - { - DIR* dirp; - struct dirent* de; -- char cur[_POSIX_PATH_MAX]; -+ char cur[2*_POSIX_PATH_MAX+16]; - struct stat statbuf; - int rc = 0; - ---- lib.h -+++ lib.h 2018-07-17 09:42:34.637928849 +0000 -@@ -59,7 +59,7 @@ - - # define HUGE_STRING 8192 - # define LONG_STRING 1024 --# define STRING 256 -+# define STRING 512 - # define SHORT_STRING 128 - - /* ---- mh.c -+++ mh.c 2018-07-17 09:42:34.637928849 +0000 -@@ -852,7 +852,7 @@ static int maildir_parse_dir (CONTEXT * - - if (subdir) - { -- char tmp[_POSIX_PATH_MAX]; -+ char tmp[2*_POSIX_PATH_MAX+16]; - snprintf (tmp, sizeof (tmp), "%s/%s", subdir, de->d_name); - h->path = safe_strdup (tmp); - } -@@ -1406,7 +1406,7 @@ static void maildir_flags (char *dest, s - - if (hdr && (hdr->flagged || hdr->replied || hdr->read || hdr->deleted || hdr->old || hdr->maildir_flags)) - { -- char tmp[LONG_STRING]; -+ char tmp[LONG_STRING], *ptr; - snprintf (tmp, sizeof (tmp), - "%s%s%s%s%s", - hdr->flagged ? "F" : "", -@@ -1415,7 +1415,10 @@ static void maildir_flags (char *dest, s - NONULL(hdr->maildir_flags)); - if (hdr->maildir_flags) - qsort (tmp, strlen (tmp), 1, ch_compar); -- snprintf (dest, destlen, ":2,%s", tmp); -+ /* snprintf (dest, destlen, ":2,%s", tmp); */ -+ strcpy(dest, ":2,"); -+ ptr = stpncpy(dest+3, tmp, destlen-3); -+ *ptr = '\0'; - } - } - -@@ -1561,7 +1564,7 @@ static int _maildir_commit_message (CONT - char subdir[4]; - char suffix[16]; - char path[_POSIX_PATH_MAX]; -- char full[_POSIX_PATH_MAX]; -+ char full[2*_POSIX_PATH_MAX+16]; - char *s; - - if (safe_fsync_close (&msg->fp)) -@@ -1586,7 +1589,7 @@ static int _maildir_commit_message (CONT - snprintf (path, _POSIX_PATH_MAX, "%s/%lld.%u_%d.%s%s", subdir, - (long long)time (NULL), (unsigned int)getpid (), Counter++, - NONULL (Hostname), suffix); -- snprintf (full, _POSIX_PATH_MAX, "%s/%s", ctx->path, path); -+ snprintf (full, sizeof(full), "%s/%s", ctx->path, path); - - dprint (2, (debugfile, "_maildir_commit_message (): renaming %s to %s.\n", - msg->path, full)); -@@ -1825,9 +1828,9 @@ static int maildir_sync_message (CONTEXT - /* we just have to rename the file. */ - - char newpath[_POSIX_PATH_MAX]; -- char partpath[_POSIX_PATH_MAX]; -- char fullpath[_POSIX_PATH_MAX]; -- char oldpath[_POSIX_PATH_MAX]; -+ char partpath[_POSIX_PATH_MAX+64]; -+ char fullpath[2*_POSIX_PATH_MAX+16]; -+ char oldpath[2*_POSIX_PATH_MAX+16]; - char suffix[16]; - char *p; - -@@ -2371,9 +2374,9 @@ static int mh_check_mailbox (CONTEXT * c - static FILE *_maildir_open_find_message (const char *folder, const char *unique, - const char *subfolder) - { -- char dir[_POSIX_PATH_MAX]; -+ char dir[2*_POSIX_PATH_MAX+16]; - char tunique[_POSIX_PATH_MAX]; -- char fname[_POSIX_PATH_MAX]; -+ char fname[3*_POSIX_PATH_MAX]; - - DIR *dp; - struct dirent *de; ---- mutt_sasl.c -+++ mutt_sasl.c 2018-07-17 09:42:34.637928849 +0000 -@@ -80,7 +80,7 @@ static int getnameinfo_err(int ret) - * a protection buffer. */ - #define MUTT_SASL_MAXBUF 65536 - --#define IP_PORT_BUFLEN 1024 -+#define IP_PORT_BUFLEN (NI_MAXHOST+NI_MAXSERV+8) - - static sasl_callback_t mutt_sasl_callbacks[5]; - ---- mutt_ssl_gnutls.c -+++ mutt_ssl_gnutls.c 2018-07-17 09:42:34.637928849 +0000 -@@ -862,7 +862,7 @@ static int tls_check_one_certificate (co - menu->max = 25; - menu->dialog = (char **) safe_calloc (1, menu->max * sizeof (char *)); - for (i = 0; i < menu->max; i++) -- menu->dialog[i] = (char *) safe_calloc (1, SHORT_STRING * sizeof (char)); -+ menu->dialog[i] = (char *) safe_calloc (1, STRING * sizeof (char)); - mutt_push_current_menu (menu); - - row = 0; -@@ -898,10 +898,10 @@ static int tls_check_one_certificate (co - dn_country, &buflen) != 0) - dn_country[0] = '\0'; - -- snprintf (menu->dialog[row++], SHORT_STRING, " %s %s", dn_common_name, dn_email); -- snprintf (menu->dialog[row++], SHORT_STRING, " %s", dn_organization); -- snprintf (menu->dialog[row++], SHORT_STRING, " %s", dn_organizational_unit); -- snprintf (menu->dialog[row++], SHORT_STRING, " %s %s %s", -+ snprintf (menu->dialog[row++], STRING, " %s %s", dn_common_name, dn_email); -+ snprintf (menu->dialog[row++], STRING, " %s", dn_organization); -+ snprintf (menu->dialog[row++], STRING, " %s", dn_organizational_unit); -+ snprintf (menu->dialog[row++], STRING, " %s %s %s", - dn_locality, dn_province, dn_country); - row++; - -@@ -937,10 +937,10 @@ static int tls_check_one_certificate (co - dn_country, &buflen) != 0) - dn_country[0] = '\0'; - -- snprintf (menu->dialog[row++], SHORT_STRING, " %s %s", dn_common_name, dn_email); -- snprintf (menu->dialog[row++], SHORT_STRING, " %s", dn_organization); -- snprintf (menu->dialog[row++], SHORT_STRING, " %s", dn_organizational_unit); -- snprintf (menu->dialog[row++], SHORT_STRING, " %s %s %s", -+ snprintf (menu->dialog[row++], STRING, " %s %s", dn_common_name, dn_email); -+ snprintf (menu->dialog[row++], STRING, " %s", dn_organization); -+ snprintf (menu->dialog[row++], STRING, " %s", dn_organizational_unit); -+ snprintf (menu->dialog[row++], STRING, " %s %s %s", - dn_locality, dn_province, dn_country); - row++; - ---- pager.c -+++ pager.c 2018-07-17 09:42:34.637928849 +0000 -@@ -1911,7 +1911,7 @@ mutt_pager (const char *banner, const ch - { - static char searchbuf[STRING] = ""; - char buffer[LONG_STRING]; -- char helpstr[SHORT_STRING*2]; -+ char helpstr[LONG_STRING+SHORT_STRING*2+16]; - char tmphelp[SHORT_STRING*2]; - int i, ch = 0, rc = -1; - int err, first = 1; ---- pgppubring.c -+++ pgppubring.c 2018-07-17 09:42:34.637928849 +0000 -@@ -86,7 +86,7 @@ int main (int argc, char * const argv[]) - char *env_pgppath, *env_home; - - char pgppath[_POSIX_PATH_MAX]; -- char kring[_POSIX_PATH_MAX]; -+ char kring[_POSIX_PATH_MAX+64]; - - while ((c = getopt (argc, argv, "f25sk:S")) != EOF) - { ---- smime.c -+++ smime.c 2018-07-17 09:42:34.637928849 +0000 -@@ -179,7 +179,7 @@ static const char *_mutt_fmt_smime_comma - if (!optional) - { - char path[_POSIX_PATH_MAX]; -- char buf1[LONG_STRING], buf2[LONG_STRING]; -+ char buf1[LONG_STRING], buf2[LONG_STRING+16]; - struct stat sb; - - strfcpy (path, NONULL (SmimeCALocation), sizeof (path)); ---- sort.c -+++ sort.c 2018-07-17 09:42:34.637928849 +0000 -@@ -40,7 +40,7 @@ static sort_t *AuxSort = NULL; - unset_option(OPTAUXSORT); \ - } \ - if (!code) \ -- code = (*((HEADER **)a))->index - (*((HEADER **)b))->index; -+ code = (*((HEADER **)a))->index - (*((HEADER **)b))->index - - static int compare_score (const void *a, const void *b) - {