Skip to content
This repository has been archived by the owner on Apr 10, 2024. It is now read-only.

Commit

Permalink
Bug 717121 - crash nsMIMEHeaderParamImpl::DoParameterInternal. r=bz,a…
Browse files Browse the repository at this point in the history
…=Standard8 for checkin to Thunderbird/SeaMonkey specific relbrach and CLOSED TREE

--HG--
branch : COMM1001_2012020813_RELBRANCH
extra : transplant_source : f%FCe%148%E7%A3yv%A5%7F%D6%E2%E7%C3%07%B5%D0fm
  • Loading branch information
makotokato committed Feb 3, 2012
1 parent da13fce commit 5745156
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 4 additions & 1 deletion netwerk/mime/nsMIMEHeaderParamImpl.cpp
Expand Up @@ -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),
Expand Down
5 changes: 5 additions & 0 deletions netwerk/test/unit/test_MIME_params.js
Expand Up @@ -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)
Expand Down

0 comments on commit 5745156

Please sign in to comment.