Bug 345580 - Problem decoding quoted-printable question mark in subject r=biesi

--HG--
extra : rebase_source : 37f27948211ee70c5f4a133eefee6c275ebc3fc8
This commit is contained in:
Andrew Sutherland 2016-01-28 14:25:46 -05:00
Родитель e148eb356e
Коммит 2ed9444a3c
1 изменённых файлов: 6 добавлений и 5 удалений

Просмотреть файл

@ -1238,13 +1238,14 @@ nsresult DecodeRFC2047Str(const char *aHeader, const char *aDefaultCharset,
if (q[1] != '?')
goto badsyntax;
r = q;
for (r = q + 2; *r != '?'; r++) {
// loop-wise, keep going until we hit "?=". the inner check handles the
// nul terminator should the string terminate before we hit the right
// marker. (And the r[1] will never reach beyond the end of the string
// because *r != '?' is true if r is the nul character.)
for (r = q + 2; *r != '?' || r[1] != '='; r++) {
if (*r < ' ') goto badsyntax;
}
if (r[1] != '=')
goto badsyntax;
else if (r == q + 2) {
if (r == q + 2) {
// it's empty, skip
begin = r + 2;
isLastEncodedWord = 1;