Permalink
Browse files

Bug 717121 - crash nsMIMEHeaderParamImpl::DoParameterInternal. r=bz,a…

…=Standard8 for checkin to Thunderbird/SeaMonkey specific relbrach and CLOSED TREE

--HG--
branch : COMM1001_2012020809_RELBRANCH
extra : transplant_source : %F6X%00%B0t%AC%B76X%01%29Bi2uO%3D2%0F%9E
  • Loading branch information...
1 parent ffcc939 commit 3569bfb19dad73b0fb0f07c49b388a72f31ad778 @makotokato makotokato committed Feb 3, 2012
Showing with 9 additions and 1 deletion.
  1. +4 −1 netwerk/mime/nsMIMEHeaderParamImpl.cpp
  2. +5 −0 netwerk/test/unit/test_MIME_params.js
View
5 netwerk/mime/nsMIMEHeaderParamImpl.cpp
@@ -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
5 netwerk/test/unit/test_MIME_params.js
@@ -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)

0 comments on commit 3569bfb

Please sign in to comment.