diff -Nru mutt-2.2.4/alias.c mutt-2.2.6/alias.c
--- mutt-2.2.4/alias.c 2022-03-24 21:38:29.000000000 +0000
+++ mutt-2.2.6/alias.c 2022-05-27 21:24:33.000000000 +0000
@@ -425,16 +425,17 @@
{
wchar_t wc;
mbstate_t mb;
- size_t l;
+ size_t l, n;
int rv = 0, bad = 0, dry = !dest;
memset (&mb, 0, sizeof (mbstate_t));
+ n = mutt_strlen (s);
if (!dry)
mutt_buffer_clear (dest);
- for (; s && *s &&
- (l = mbrtowc (&wc, s, MB_CUR_MAX, &mb)) != 0;
- s += l)
+ for (; s && *s && n &&
+ (l = mbrtowc (&wc, s, n, &mb)) != 0;
+ s += l, n-= l)
{
bad = l == (size_t)(-1) || l == (size_t)(-2); /* conversion error */
if (l == 1)
@@ -446,7 +447,12 @@
if (dry)
return -1;
if (l == (size_t)(-1))
+ {
memset (&mb, 0, sizeof (mbstate_t));
+ l = 1;
+ }
+ if (l == (size_t)(-2))
+ l = n;
mutt_buffer_addch (dest, '_');
rv = -1;
}
diff -Nru mutt-2.2.4/browser.c mutt-2.2.6/browser.c
--- mutt-2.2.4/browser.c 2022-04-21 21:35:19.000000000 +0000
+++ mutt-2.2.6/browser.c 2022-06-05 18:00:36.000000000 +0000
@@ -89,7 +89,7 @@
struct folder_file *pa = (struct folder_file *) a;
struct folder_file *pb = (struct folder_file *) b;
- int r = pa->number - pb->number;
+ int r = mutt_numeric_cmp (pa->number, pb->number);
return (sort_reverse_flag ? -r : r);
}
@@ -109,7 +109,7 @@
struct folder_file *pa = (struct folder_file *) a;
struct folder_file *pb = (struct folder_file *) b;
- int r = pa->mtime - pb->mtime;
+ int r = mutt_numeric_cmp (pa->mtime, pb->mtime);
return (sort_reverse_flag ? -r : r);
}
@@ -119,7 +119,7 @@
struct folder_file *pa = (struct folder_file *) a;
struct folder_file *pb = (struct folder_file *) b;
- int r = pa->size - pb->size;
+ int r = mutt_numeric_cmp (pa->size, pb->size);
return (sort_reverse_flag ? -r : r);
}
@@ -129,7 +129,7 @@
struct folder_file *pa = (struct folder_file *) a;
struct folder_file *pb = (struct folder_file *) b;
- int r = pa->msg_count - pb->msg_count;
+ int r = mutt_numeric_cmp (pa->msg_count, pb->msg_count);
return (sort_reverse_flag ? -r : r);
}
@@ -139,7 +139,7 @@
struct folder_file *pa = (struct folder_file *) a;
struct folder_file *pb = (struct folder_file *) b;
- int r = pa->msg_unread - pb->msg_unread;
+ int r = mutt_numeric_cmp (pa->msg_unread, pb->msg_unread);
return (sort_reverse_flag ? -r : r);
}
@@ -845,7 +845,14 @@
if (*(mutt_b2s (f)))
{
- mutt_buffer_expand_path (f);
+ /* Note we use _norel because:
+ * 1) The code below already handles relative path expansion.
+ * 2) Browser completion listing handles 'dir/' differently from
+ * 'dir'. The former will list the content of the directory.
+ * The latter will list current directory completions with
+ * prefix 'dir'.
+ */
+ mutt_buffer_expand_path_norel (f);
#ifdef USE_IMAP
if (mx_is_imap (mutt_b2s (f)))
{
diff -Nru mutt-2.2.4/ChangeLog mutt-2.2.6/ChangeLog
--- mutt-2.2.4/ChangeLog 2022-04-30 19:39:54.000000000 +0000
+++ mutt-2.2.6/ChangeLog 2022-06-05 18:16:38.000000000 +0000
@@ -1,3 +1,223 @@
+2022-06-05 11:13:47 -0700 Kevin McCarthy (42c9d1ea)
+
+ * Update UPDATING file for 2.2.6 release.
+
+M UPDATING
+
+2022-05-27 14:58:23 -0700 Kevin McCarthy (44636260)
+
+ * Fix $pgp_sort_keys sorting.
+
+ Both gpgme and pgpkey used nonsensical comparison return values, for
+ example: "return r > 0".
+
+ Adjust numeric comparisons to use mutt_numeric_cmp() and have the
+ comparator return the result of the actual comparison.
+
+ Adjust the "trust" sorting of gpgme to be the same as classic-pgp:
+ putting restrictions at the bottom, but reverse sorting validity,
+ length and timestamp values so they come first in the list.
+
+M crypt-gpgme.c
+M pgpkey.c
+
+2022-05-22 19:03:33 -0700 Kevin McCarthy (818ea32c)
+
+ * Adjust browser and sidebar numeric sorting to use mutt_numeric_cmp()
+
+ Large values shouldn't use subtraction into an integer return type, so
+ just convert all of them to use the macro, to be safe.
+
+M browser.c
+M sidebar.c
+
+2022-05-27 13:24:11 -0700 Kevin McCarthy (f8336984)
+
+ * Fix mbrtowc() error handling in mutt_which_case().
+
+ The function did not reset the increment value on a -2 return value.
+
+ Increase the maximum conversion size to the string length, and check
+ for -2. Since we're looking at the whole string, we can then just
+ terminate the loop on either value, assuming a case-sensitive search.
+
+ mbrtowc() will return -2 if passed n==0, so add an explicit check for
+ the end of string and a positive n count.
+
+M pattern.c
+
+2022-05-27 13:22:22 -0700 Kevin McCarthy (def28317)
+
+ * Fix mbrtowc() error handling in check_alias_name().
+
+ The function did not reset the increment value on any error. Increase
+ the maximum conversion size to the string length, and check for -2.
+ Since we're looking at the whole string, we can then just terminate
+ the loop on a -2 return value.
+
+M alias.c
+
+2022-05-26 11:29:15 -0700 Kevin McCarthy (51c67ba9)
+
+ * Convert my_width() to use mbrtowc().
+
+ This allows handling a single corrupted character vs an incomplete
+ multibyte character differently, as other parts of Mutt do.
+
+M sendlib.c
+
+2022-05-25 20:59:39 -0700 Kevin McCarthy (ca960228)
+
+ * Fix header folding my_width() calculation.
+
+ After calculating the width of a character, the routine would only
+ increment the string pointer by one byte. Any errors returned by
+ mbtowc() would also increment the width by one. This means multibyte
+ characters would overcount width by the number of bytes minus one.
+
+ Change it to check the return value and use that value to increment
+ the string pointer.
+
+ Change mbtowc() to look at the whole rest of the string instead of
+ just MB_CUR_MAX, as the manpage says even MB_CUR_MAX may not be enough
+ in some circumstances.
+
+ Since we calculate strlen, use that as well as '\0' for the loop
+ termination check. Also check for mbtowc() returning 0 just for extra
+ safety.
+
+ Reset the internal mbstate_t before converting, and on any error.
+
+ If mbtowc() returns an error, use replacment_char() as a substitue for
+ width calcluation, as mutt_strwidth() and other parts of Mutt do.
+
+M sendlib.c
+
+2022-05-25 09:53:07 -0700 Kevin McCarthy (67bb3d35)
+
+ * Filter Arabic Letter Mark due to display corruption.
+
+ Under GNU Screen, the directional marker causes display corruption in
+ the index.
+
+ This (along with past filters added) should perhaps be considered GNU
+ Screen bugs. They've been reported upstream a while ago, but so far
+ not received any attention. So for Mutt users' benefit it's better to
+ filter them out for now.
+
+ Thanks to Vincent Lefèvre for debugging and reporting the problem,
+ along with providing historical information from similar past issues.
+
+M mbyte.c
+
+2022-05-21 09:18:04 -0700 Kevin McCarthy (ceb6c4fc)
+
+ * Fix browser completion path expansion to preserve a trailing slash.
+
+ The browser lists the contents of a directory passed as 'f' when it
+ has a trailing slash; without, it lists everything matching that name
+ in the parent directory.
+
+ Since the browser does its own relative path expansion, we can just
+ use mutt_buffer_path_norel() to keep a trailing slash in 'f'.
+
+M browser.c
+
+2022-05-21 09:07:23 -0700 Kevin McCarthy (599806a0)
+
+ * Decouple expand_path() relpath vs trailing slash handling.
+
+ This change was originally done for the next commit, to fix browser
+ completion handling. However, I discovered the browser does its own
+ relative path expansion, and could just be fixed by using the _norel()
+ version.
+
+ Still, I think this change is a good idea in any case. There may be a
+ few more fixes needed that require relpath expansion while keeping
+ trailing slashes.
+
+ Since the number of flag parameters to expand_path would become
+ excessive by adding a "remove_trailing_slash" paremeter, convert it to
+ use a single 'flags' parameter instead.
+
+M hook.c
+M mutt.h
+M muttlib.c
+M protos.h
+
+2022-05-20 08:51:05 -0700 Helge Kreutzmann (5006b546)
+
+ * Update de.po.
+
+M po/de.po
+
+2022-05-19 12:36:06 -0700 Kevin McCarthy (80d90e0c)
+
+ * Document $sendmail invocation behavior.
+
+ This variable is handled differently from other "command" variables in
+ Mutt. It's tokenized by space and then executed via execvp(). This
+ means spaces in command/arguments are not supported, and neither is
+ shell quoting.
+
+ I don't know if it was done this way out of some security concern, but
+ it seems like using mutt_system() and mutt_buffer_quote_filename() for
+ recipient arguments should at least be investigated.
+
+M init.h
+
+2022-05-16 10:20:30 -0700 Kevin McCarthy (a8c7fba1)
+
+ * automatic post-release commit for mutt-2.2.5
+
+M ChangeLog
+M VERSION
+
+2022-05-16 10:16:07 -0700 Kevin McCarthy (c94b511a)
+
+ * Update UPDATING file for 2.2.5.
+
+M UPDATING
+
+2022-05-13 15:37:58 -0700 Kevin McCarthy (6688bfbf)
+
+ * Set gsasl hostname callback value.
+
+ This is needed for GSSAPI, and apparently DIGEST-MD5 too.
+
+ The gsasl documentation is a little confusing, saying it "should be
+ the local host name of the machine", however the imap/auth_gss.c code
+ seems to be using the server name, and the msmtp source also uses the
+ server name for this callback.
+
+ Thanks to brian m. carlson and Gábor Gombás for reporting this issue
+ in Debian ticket 1010915, and an additional thanks to brian for
+ quickly testing the fix.
+
+M mutt_sasl_gnu.c
+
+2022-05-06 12:51:56 -0700 Kevin McCarthy (9d5db7cb)
+
+ * Force IR with gsasl SMTP PLAIN authentication.
+
+ Debian ticket 1010658 showed a server violating RFC 4954 by sending
+ non-base64 data in the 334 response when Mutt sends "AUTH PLAIN"
+ (without IR).
+
+ The msmtp source also seems to force IR with PLAIN because it found
+ other broken servers.
+
+ So the best option seems to be just handling PLAIN specially for now.
+
+M smtp.c
+
+2022-04-30 12:41:43 -0700 Kevin McCarthy (c3baa83e)
+
+ * automatic post-release commit for mutt-2.2.4
+
+M ChangeLog
+M VERSION
+
2022-04-30 12:38:09 -0700 Kevin McCarthy (4d082513)
* Update UPDATING file for 2.2.4 release.
diff -Nru mutt-2.2.4/configure mutt-2.2.6/configure
--- mutt-2.2.4/configure 2022-04-30 19:42:13.000000000 +0000
+++ mutt-2.2.6/configure 2022-06-05 18:20:14.000000000 +0000
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.71 for mutt 2.2.4.
+# Generated by GNU Autoconf 2.71 for mutt 2.2.6.
#
#
# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation,
@@ -608,8 +608,8 @@
# Identity of this package.
PACKAGE_NAME='mutt'
PACKAGE_TARNAME='mutt'
-PACKAGE_VERSION='2.2.4'
-PACKAGE_STRING='mutt 2.2.4'
+PACKAGE_VERSION='2.2.6'
+PACKAGE_STRING='mutt 2.2.6'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1443,7 +1443,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures mutt 2.2.4 to adapt to many kinds of systems.
+\`configure' configures mutt 2.2.6 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1514,7 +1514,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of mutt 2.2.4:";;
+ short | recursive ) echo "Configuration of mutt 2.2.6:";;
esac
cat <<\_ACEOF
@@ -1673,7 +1673,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-mutt configure 2.2.4
+mutt configure 2.2.6
generated by GNU Autoconf 2.71
Copyright (C) 2021 Free Software Foundation, Inc.
@@ -2330,7 +2330,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by mutt $as_me 2.2.4, which was
+It was created by mutt $as_me 2.2.6, which was
generated by GNU Autoconf 2.71. Invocation command line was
$ $0$ac_configure_args_raw
@@ -3604,7 +3604,7 @@
# Define the identity of the package.
PACKAGE='mutt'
- VERSION='2.2.4'
+ VERSION='2.2.6'
printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
@@ -17260,7 +17260,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by mutt $as_me 2.2.4, which was
+This file was extended by mutt $as_me 2.2.6, which was
generated by GNU Autoconf 2.71. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -17328,7 +17328,7 @@
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config='$ac_cs_config_escaped'
ac_cs_version="\\
-mutt config.status 2.2.4
+mutt config.status 2.2.6
configured by $0, generated by GNU Autoconf 2.71,
with options \\"\$ac_cs_config\\"
diff -Nru mutt-2.2.4/crypt-gpgme.c mutt-2.2.6/crypt-gpgme.c
--- mutt-2.2.4/crypt-gpgme.c 2022-04-12 20:38:51.000000000 +0000
+++ mutt-2.2.6/crypt-gpgme.c 2022-05-28 18:10:49.000000000 +0000
@@ -3478,9 +3478,9 @@
int r;
if ((r = mutt_strcasecmp ((*s)->uid, (*t)->uid)))
- return r > 0;
+ return r;
else
- return mutt_strcasecmp (crypt_fpr_or_lkeyid (*s), crypt_fpr_or_lkeyid (*t)) > 0;
+ return mutt_strcasecmp (crypt_fpr_or_lkeyid (*s), crypt_fpr_or_lkeyid (*t));
}
static int crypt_compare_address (const void *a, const void *b)
@@ -3498,9 +3498,9 @@
int r;
if ((r = mutt_strcasecmp (crypt_fpr_or_lkeyid (*s), crypt_fpr_or_lkeyid (*t))))
- return r > 0;
+ return r;
else
- return mutt_strcasecmp ((*s)->uid, (*t)->uid) > 0;
+ return mutt_strcasecmp ((*s)->uid, (*t)->uid);
}
static int crypt_compare_keyid (const void *a, const void *b)
@@ -3524,9 +3524,9 @@
if (ts > tt)
return 1;
if (ts < tt)
- return 0;
+ return -1;
- return mutt_strcasecmp ((*s)->uid, (*t)->uid) > 0;
+ return mutt_strcasecmp ((*s)->uid, (*t)->uid);
}
static int crypt_compare_date (const void *a, const void *b)
@@ -3544,34 +3544,35 @@
unsigned long ts = 0, tt = 0;
int r;
- if ((r = (((*s)->flags & (KEYFLAG_RESTRICTIONS))
- - ((*t)->flags & (KEYFLAG_RESTRICTIONS)))))
- return r > 0;
-
- ts = (*s)->validity;
- tt = (*t)->validity;
- if ((r = (tt - ts)))
- return r < 0;
+ if ((r = mutt_numeric_cmp (((*s)->flags & (KEYFLAG_RESTRICTIONS)),
+ ((*t)->flags & (KEYFLAG_RESTRICTIONS)))))
+ return r;
+
+ /* Note: reversed */
+ if ((r = mutt_numeric_cmp ((*t)->validity, (*s)->validity)))
+ return r;
+ ts = tt = 0;
if ((*s)->kobj->subkeys)
ts = (*s)->kobj->subkeys->length;
if ((*t)->kobj->subkeys)
tt = (*t)->kobj->subkeys->length;
- if (ts != tt)
- return ts > tt;
+ /* Note: reversed */
+ if ((r = mutt_numeric_cmp (tt, ts)))
+ return r;
+ ts = tt = 0;
if ((*s)->kobj->subkeys && ((*s)->kobj->subkeys->timestamp > 0))
ts = (*s)->kobj->subkeys->timestamp;
if ((*t)->kobj->subkeys && ((*t)->kobj->subkeys->timestamp > 0))
tt = (*t)->kobj->subkeys->timestamp;
- if (ts > tt)
- return 1;
- if (ts < tt)
- return 0;
+ /* Note: reversed: */
+ if ((r = mutt_numeric_cmp (tt, ts)))
+ return r;
if ((r = mutt_strcasecmp ((*s)->uid, (*t)->uid)))
- return r > 0;
- return (mutt_strcasecmp (crypt_fpr_or_lkeyid ((*s)), crypt_fpr_or_lkeyid ((*t)))) > 0;
+ return r;
+ return mutt_strcasecmp (crypt_fpr_or_lkeyid (*s), crypt_fpr_or_lkeyid (*t));
}
static int crypt_compare_trust (const void *a, const void *b)
diff -Nru mutt-2.2.4/debian/changelog mutt-2.2.6/debian/changelog
--- mutt-2.2.4/debian/changelog 2022-06-21 21:28:32.000000000 +0000
+++ mutt-2.2.6/debian/changelog 2022-07-09 04:52:56.000000000 +0000
@@ -1,8 +1,8 @@
-mutt (2.2.4-1build1) kinetic; urgency=medium
+mutt (2.2.6-1) unstable; urgency=medium
- * No-change rebuild against libgsasl18
+ * New upstream release.
- -- Steve Langasek Tue, 21 Jun 2022 21:28:32 +0000
+ -- Antonio Radici Sat, 09 Jul 2022 06:52:56 +0200
mutt (2.2.4-1) unstable; urgency=medium
diff -Nru mutt-2.2.4/debian/control mutt-2.2.6/debian/control
--- mutt-2.2.4/debian/control 2022-06-21 21:28:32.000000000 +0000
+++ mutt-2.2.6/debian/control 2022-04-27 07:51:51.000000000 +0000
@@ -1,8 +1,7 @@
Source: mutt
Section: mail
Priority: optional
-Maintainer: Ubuntu Developers
-XSBC-Original-Maintainer: Mutt maintainers
+Maintainer: Mutt maintainers
Uploaders:
Antonio Radici ,
Build-Depends: debhelper-compat (= 12),
diff -Nru mutt-2.2.4/debian/patches/debian-specific/467432-write_bcc.patch mutt-2.2.6/debian/patches/debian-specific/467432-write_bcc.patch
--- mutt-2.2.4/debian/patches/debian-specific/467432-write_bcc.patch 2022-05-08 16:31:11.000000000 +0000
+++ mutt-2.2.6/debian/patches/debian-specific/467432-write_bcc.patch 2022-07-09 04:52:56.000000000 +0000
@@ -59,7 +59,7 @@
*/
#if defined(HAVE_LIBIDN) || defined(HAVE_LIBIDN2)
{ "idn_decode", DT_BOOL, R_MENU, {.l=OPTIDNDECODE}, {.l=1} },
-@@ -4092,10 +4086,6 @@
+@@ -4099,10 +4093,6 @@
** This is a format string, see the $$smime_decrypt_command command for
** possible \fCprintf(3)\fP-like sequences.
** (S/MIME only)
@@ -70,7 +70,7 @@
*/
#ifdef USE_SMTP
{ "smtp_authenticators", DT_STR, R_NONE, {.p=&SmtpAuthenticators}, {.p=0} },
-@@ -4314,9 +4304,6 @@
+@@ -4321,9 +4311,6 @@
** .ts
** set ssl_ca_certificates_file=/etc/ssl/certs/ca-certificates.crt
** .te
@@ -102,7 +102,7 @@
}
/* Do NOT add the terminator here!!! */
-@@ -2250,7 +2250,7 @@
+@@ -2265,7 +2265,7 @@
*/
int mutt_write_rfc822_header (FILE *fp, ENVELOPE *env, BODY *attach, char *date,
mutt_write_header_mode mode, int privacy,
@@ -111,7 +111,7 @@
{
char buffer[LONG_STRING];
char *p, *q;
-@@ -2313,7 +2313,7 @@
+@@ -2328,7 +2328,7 @@
else if (mode == MUTT_WRITE_HEADER_EDITHDRS)
fputs ("Cc: \n", fp);
@@ -120,7 +120,7 @@
{
if (mode == MUTT_WRITE_HEADER_POSTPONE ||
mode == MUTT_WRITE_HEADER_EDITHDRS ||
-@@ -3151,7 +3151,7 @@
+@@ -3166,7 +3166,7 @@
post ? MUTT_WRITE_HEADER_POSTPONE : MUTT_WRITE_HEADER_FCC,
0,
option (OPTCRYPTPROTHDRSREAD) &&
@@ -170,7 +170,7 @@
if (old_write_bcc)
--- a/pattern.c
+++ b/pattern.c
-@@ -475,7 +475,7 @@
+@@ -474,7 +474,7 @@
mutt_write_rfc822_header (fp, h->env, h->content, NULL,
MUTT_WRITE_HEADER_POSTPONE,
diff -Nru mutt-2.2.4/debian/patches/debian-specific/530584-default-tmpdir-to-var-tmp-docs.patch mutt-2.2.6/debian/patches/debian-specific/530584-default-tmpdir-to-var-tmp-docs.patch
--- mutt-2.2.4/debian/patches/debian-specific/530584-default-tmpdir-to-var-tmp-docs.patch 2022-05-08 16:31:20.000000000 +0000
+++ mutt-2.2.6/debian/patches/debian-specific/530584-default-tmpdir-to-var-tmp-docs.patch 2022-07-09 04:52:56.000000000 +0000
@@ -3,7 +3,7 @@
--- a/doc/manual.html
+++ b/doc/manual.html
-@@ -9773,7 +9773,7 @@
+@@ -9780,7 +9780,7 @@
This variable allows you to specify where Mutt will place its
temporary files needed for displaying and composing messages. If
this variable is not set, the environment variable $TMPDIR
is
@@ -12,7 +12,7 @@
Type: string
Default: “ +TCFL
”
Controls the character used to indicate mail addressed to you. The
-@@ -9977,4 +9977,4 @@
+@@ -9984,4 +9984,4 @@
This document was written in DocBook, and then rendered
using the Gnome XSLT
toolkit.
@@ -21,7 +21,7 @@
+