Bug 717121 - crash nsMIMEHeaderParamImpl::DoParameterInternal. r=bz

This commit is contained in:
Makoto Kato 2012-02-03 15:09:40 +09:00
parent bf06aefe68
commit 41d240e25b
2 changed files with 9 additions and 1 deletions

View File

@ -308,7 +308,10 @@ nsMIMEHeaderParamImpl::DoParameterInternal(const char *aHeaderValue,
else if (*valueEnd == '"')
break;
}
str = valueEnd + 1;
str = valueEnd;
// *valueEnd != null means that *valueEnd is quote character.
if (*valueEnd)
str++;
}
// See if this is the simplest case (case A above),

View File

@ -296,6 +296,11 @@ var tests = [
["attachment; filename*=\"a%20b\"",
"attachment", "a b"],
// Bug 717121: crash nsMIMEHeaderParamImpl::DoParameterInternal
["attachment; filename=\"",
"attachment", ""],
];
function do_tests(whichRFC)