changeset: 6753:108ad5dcf194
user:      Kevin McCarthy <ke...@8t8.us>
date:      Fri Aug 05 14:33:39 2016 -0700
link:      http://dev.mutt.org/hg/mutt/rev/108ad5dcf194

Remove nonsensical size check in mutt_choose_charset()

The charsets parameter is being tokenized by the : delimeter.

The checks against ENCWORD_LEN_MAX and ENCWORD_LEN_MIN make no sense,
and appear to be the result of a large merge a very long time ago
(changeset cb27682966d5).

I can only guess where this check was supposed to be, but it certainly
doesn't belong here.

diffs (16 lines):

diff -r a39c8bdca361 -r 108ad5dcf194 rfc2047.c
--- a/rfc2047.c Fri Aug 05 13:43:04 2016 -0700
+++ b/rfc2047.c Fri Aug 05 14:33:39 2016 -0700
@@ -140,11 +140,7 @@
     q = strchr (p, ':');
 
     n = q ? q - p : strlen (p);
-
-    if (!n ||
-       /* Assume that we never need more than 12 characters of
-          encoded-text to encode a single character. */
-       n > (ENCWORD_LEN_MAX - ENCWORD_LEN_MIN + 2 - 12))
+    if (!n)
       continue;
 
     t = safe_malloc (n + 1);

Reply via email to