mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 345580 - Problem decoding quoted-printable question mark in subject r=biesi
This commit is contained in:
parent
a06b332716
commit
dd7d08ab97
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user