Closed
Bug 531363
Opened 15 years ago
Closed 15 years ago
incorrect test for mFlags in JPEG decoder
Categories
(Core :: Graphics: ImageLib, defect)
Core
Graphics: ImageLib
Tracking
()
RESOLVED
FIXED
People
(Reporter: jfkthame, Unassigned)
Details
Attachments
(1 file)
(deleted),
patch
|
bholley
:
review+
|
Details | Diff | Splinter Review |
While trying to track down the root cause of bug 516334, noticed a typo in nsJPEGDecoder.cpp: the code uses && where & is intended (testing a bit flag). This could potentially cause it to fail to issue appropriate notifications, although fixing this does not actually resolve 516334 (which is not JPEG-specific but can occur with any image format).
Reporter | ||
Updated•15 years ago
|
Attachment #414819 -
Attachment is patch: true
Attachment #414819 -
Attachment mime type: application/octet-stream → text/plain
Attachment #414819 -
Flags: review?(bobbyholley)
Comment 1•15 years ago
|
||
Right now this is harmless, because there's only 1 possible flag, so & and && are equivalent - so the net effect is if (mFlags), which will be either 1 or 0 depending on whether the one flag is set.
http://mxr.mozilla.org/mozilla-central/source/modules/libpr0n/public/imgIDecoder.idl#68
Definitely needs to be fixed though.
Reporter | ||
Comment 2•15 years ago
|
||
Yeah, that's consistent with the observation that fixing the test didn't make any difference to the problem in 516334; it just happened to be a line of code that got looked at along the way.
(I hadn't checked whether there were other possible flag values; but did notice that in all the traces I looked at, mFlags was zero anyway.)
Comment 3•15 years ago
|
||
Comment on attachment 414819 [details] [diff] [review]
fix the flag test to use bitwise AND rather than logical AND
r+
Attachment #414819 -
Flags: review?(bobbyholley) → review+
Reporter | ||
Comment 4•15 years ago
|
||
Pushed to trunk:
http://hg.mozilla.org/mozilla-central/rev/f5ae3ffa3363
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•