Closed
Bug 319977
Opened 19 years ago
Closed 19 years ago
Minor string parser coding error in nsIconURI.cpp
Categories
(Core :: Graphics: ImageLib, defect)
Core
Graphics: ImageLib
Tracking
()
VERIFIED
FIXED
mozilla1.9alpha1
People
(Reporter: alfredkayser, Assigned: alfredkayser)
Details
Attachments
(1 file, 3 obsolete files)
(deleted),
patch
|
bryner
:
superreview+
|
Details | Diff | Splinter Review |
In nsIconURI.cpp there is some strange logic with string parsing:
> if (startOfAttribute)
> {
> startOfAttribute += attributeNameSize; // skip over the attributeName
> if (startOfAttribute) // is there something after the attribute name
Probably the last line needs to read:
> if (*startOfAttribute) // is there something after the attribute name
Same goes for endOfAttribute further down.
Patch following...
Assignee | ||
Comment 1•19 years ago
|
||
Simple patch to correct the scanner logic.
Note, this whole function and the way that arg's are parsed is very inefficient...
But probably not worth the trouble to optimize it?
Attachment #205631 -
Flags: review?(mark)
Assignee | ||
Comment 2•19 years ago
|
||
Attachment #205631 -
Attachment is obsolete: true
Attachment #205631 -
Flags: review?(mark)
Assignee | ||
Comment 3•19 years ago
|
||
Attachment #205633 -
Attachment is obsolete: true
Assignee | ||
Updated•19 years ago
|
Attachment #205635 -
Flags: review?(cbiesinger)
Comment 4•19 years ago
|
||
Comment on attachment 205635 [details] [diff] [review]
v3: corrected syntax error
could you stay with using tabs, as the surrounding code uses them too?
PRUint32 attributeNameSize = PL_strlen(attributeName);
might want to replace this with just strlen, while you're here
+ const char * endofAttribute = PL_strchr(startOfAttribute, '&');
and this with strchr
Attachment #205635 -
Flags: review?(cbiesinger) → review+
Assignee | ||
Comment 5•19 years ago
|
||
Bryner, can you sr this?
Attachment #205635 -
Attachment is obsolete: true
Attachment #211831 -
Flags: superreview?
Assignee | ||
Updated•19 years ago
|
Attachment #211831 -
Flags: superreview? → superreview?(bryner)
Updated•19 years ago
|
Attachment #211831 -
Flags: superreview?(bryner) → superreview+
Assignee | ||
Comment 6•19 years ago
|
||
Who can do the Checkin for me, as I don't have cvs (write) access?
Thanks in advance, Alfred
Assignee | ||
Updated•19 years ago
|
Whiteboard: checkin required
Updated•19 years ago
|
Assignee: pavlov → alfredkayser
Comment 7•19 years ago
|
||
mozilla/modules/libpr0n/decoders/icon/nsIconURI.cpp 1.21
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Whiteboard: checkin required
Target Milestone: --- → mozilla1.9alpha
Assignee | ||
Comment 8•19 years ago
|
||
Verified to be committed to the tree. There is (luckely) no testcase for this bug.
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•