https://bugs.exim.org/show_bug.cgi?id=3168

            Bug ID: 3168
           Summary: ${rfc2047:} expansion is generating encoded-words
                    longer than permitted in RFC 2047
           Product: Exim
           Version: 4.98.2
          Hardware: x86-64
                OS: Linux
            Status: NEW
          Severity: bug
          Priority: medium
         Component: String expansion
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]

Section 2 of RFC 2047 states:

====

An 'encoded-word' may not be more than 75 characters long, including
'charset', 'encoding', 'encoded-text', and delimiters.

====

However, it is trivial to generate an expansion which exceeds 75 characters in
a single encoded-word:

$ exim -be
'${rfc2047:1234567,1234567,1234567,1234567,1234567,1234567,1234567,}'
=?ISO-8859-1?Q?1234567=2C1234567=2C1234567=2C1234567=2C1234567=2C1234567=2C1234567=2C?=

$ exim -be
'${rfc2047:1234567,1234567,1234567,1234567,1234567,1234567,1234567,}' | wc -c
88

The issue seems to be that parse_quote_2047 in src/src/parse.c is counting the
equals-encoded characters as 1 character based on its length at input, rather
than the 3 characters it is in length at output. I also think that the magic
constant of 67 being compared against has some faulty assumptions built into
it.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

-- 
## subscription configuration (requires account):
##   https://lists.exim.org/mailman3/postorius/lists/exim-dev.lists.exim.org/
## unsubscribe (doesn't require an account):
##   [email protected]
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/

Reply via email to