Closed
Bug 1340803
Opened 7 years ago
Closed 7 years ago
nsMIMEInfoWin::GetPossibleLocalHandlers may use nsAutoCString::First() on an empty string
Categories
(Firefox :: File Handling, defect)
Firefox
File Handling
Tracking
()
RESOLVED
FIXED
Firefox 54
Tracking | Status | |
---|---|---|
firefox54 | --- | fixed |
People
(Reporter: mayhemer, Assigned: mayhemer)
References
Details
Attachments
(1 file)
1.03 KB,
patch
|
jimm
:
review+
|
Details | Diff | Splinter Review |
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 | ||
Comment 1•7 years ago
|
||
selfexplanatory
Assignee | ||
Comment 2•7 years ago
|
||
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
Updated•7 years ago
|
Attachment #8838870 -
Flags: review?(jmathies) → review+
Assignee | ||
Updated•7 years ago
|
Keywords: checkin-needed
Pushed by ryanvm@gmail.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
Keywords: checkin-needed
Comment 4•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/f4eae24795b9
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox54:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 54
You need to log in
before you can comment on or make changes to this bug.
Description
•