Closed
Bug 536438
Opened 15 years ago
Closed 14 years ago
Buggy switch statement in mathml/nsMathMLChar.cpp
Categories
(Core :: MathML, defect)
Core
MathML
Tracking
()
RESOLVED
FIXED
mozilla1.9.3a2
People
(Reporter: ehren.m, Assigned: ehren.m)
References
Details
Attachments
(2 files)
773 bytes,
patch
|
fredw
:
review+
|
Details | Diff | Splinter Review |
791 bytes,
patch
|
karlt
:
review+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.3a1pre) Gecko/20091221 Minefield/3.7a1pre Build Identifier: static PRBool GetFontExtensionPref(nsIPrefBranch* aPrefBranch, PRUnichar aChar, nsMathfontPrefExtension aExtension, nsString& aValue) contains a switch statement that is most likely missing break statements for every case: http://hg.mozilla.org/mozilla-central/file/5803dc30baea/layout/mathml/nsMathMLChar.cpp#l698 This was discovered using a Treehydra analysis (see blocked bug) Reproducible: Always
Assignee | ||
Comment 1•15 years ago
|
||
I don't really know this code but this seems to make sense.
Assignee | ||
Updated•15 years ago
|
Attachment #418884 -
Flags: review?(fred.wang)
Updated•15 years ago
|
Attachment #418884 -
Flags: review?(fred.wang) → review+
Comment 2•15 years ago
|
||
Yes, I think you are entirely right. Without the break keywords, GetFontExtensionPref is just going to assign different values to the extension string and then go out with a PR_FALSE return value (and that's what I've just checked in debugging mode). Apparently, this function allows to specify font families for a given character but I don't think this preference option is very used. That's probably why no bug has been detected until now. By the way, it seems that the dead code in the second part is also wrong, since the keys are not built correctly (the end of alternateKey is appended to key). I'm going to attach a patch that fix this problem.
Comment 3•15 years ago
|
||
Attachment #419026 -
Flags: review?
Updated•15 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Updated•15 years ago
|
Attachment #419026 -
Flags: review? → review?(karlt)
Updated•14 years ago
|
Attachment #419026 -
Flags: review?(karlt) → review+
Updated•14 years ago
|
Keywords: checkin-needed
Comment 4•14 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/b56dd52130ab http://hg.mozilla.org/mozilla-central/rev/5c82af652408
Assignee: nobody → ehren.m
Status: NEW → RESOLVED
Closed: 14 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a2
You need to log in
before you can comment on or make changes to this bug.
Description
•