nsMIMEInfoWin::GetPossibleLocalHandlers may use nsAutoCString::First() on an empty string

RESOLVED FIXED in Firefox 54

Status

()

defect
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: mayhemer, Assigned: mayhemer)

Tracking

unspecified
Firefox 54
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox54 fixed)

Details

Attachments

(1 attachment)

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.
selfexplanatory
Assignee: nobody → honzab.moz
Status: NEW → ASSIGNED
Attachment #8838870 - Flags: review?(jmathies)
Attachment #8838870 - Flags: review?(jmathies) → review+
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
https://hg.mozilla.org/mozilla-central/rev/f4eae24795b9
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 54
You need to log in before you can comment on or make changes to this bug.