Closed Bug 1340803 Opened 5 years ago Closed 5 years ago
MIMEInfo Win::Get Possible Local Handlers may use ns Auto CString::First() on an empty string
This is probably not super critical, since when the string is empty, First should return '\0'. The code in question is |if (fileExt.First() != '.')| so that when the string is empty, the condition correctly doesn't pass. Still, we want to enforce using First() only on non-empty strings, so this needs a small fix.
Assignee: nobody → honzab.moz
Status: NEW → ASSIGNED
Attachment #8838870 - Flags: review?(jmathies)
Comment on attachment 8838870 [details] [diff] [review] v1 (check string's non-emptiness before calling First()) https://treeherder.mozilla.org/#/jobs?repo=try&revision=5a2049fc3c2261c2c4849b5526f617e54c622705
Pushed by email@example.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/f4eae24795b9 Make nsMIMEInfoWin::GetPossibleLocalHandlers check fileExt is non-empty before checking its first char. r=jimm
You need to log in before you can comment on or make changes to this bug.