зеркало из https://github.com/mozilla/gecko-dev.git
Bug 345580 - Problem decoding quoted-printable question mark in subject r=biesi
--HG-- extra : rebase_source : 37f27948211ee70c5f4a133eefee6c275ebc3fc8
This commit is contained in:
Родитель
e148eb356e
Коммит
2ed9444a3c
|
@ -1238,13 +1238,14 @@ nsresult DecodeRFC2047Str(const char *aHeader, const char *aDefaultCharset,
|
||||||
if (q[1] != '?')
|
if (q[1] != '?')
|
||||||
goto badsyntax;
|
goto badsyntax;
|
||||||
|
|
||||||
r = q;
|
// loop-wise, keep going until we hit "?=". the inner check handles the
|
||||||
for (r = q + 2; *r != '?'; r++) {
|
// 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 < ' ') goto badsyntax;
|
||||||
}
|
}
|
||||||
if (r[1] != '=')
|
if (r == q + 2) {
|
||||||
goto badsyntax;
|
|
||||||
else if (r == q + 2) {
|
|
||||||
// it's empty, skip
|
// it's empty, skip
|
||||||
begin = r + 2;
|
begin = r + 2;
|
||||||
isLastEncodedWord = 1;
|
isLastEncodedWord = 1;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче