Permalink
Browse files

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

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

--HG--
branch : COMM1002_2012021601_RELBRANCH
extra : transplant_source : f%FCe%148%E7%A3yv%A5%7F%D6%E2%E7%C3%07%B5%D0fm
  • Loading branch information...
1 parent 3e8bd6d commit 03d11964b2ccd1dca86b3c0c44a780b3fd4b2eee @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 03d1196

Please sign in to comment.