Closed
Bug 368668
Opened 18 years ago
Closed 17 years ago
coverity CID: 1106 deadcode at cairo-cff-subset.c:encode_integer
Categories
(Core :: Graphics, defect)
Tracking
()
RESOLVED
FIXED
mozilla1.9alpha8
People
(Reporter: guninski, Assigned: ehsan.akhgari)
References
(Blocks 1 open bug, )
Details
(Keywords: coverity)
Attachments
(1 file)
(deleted),
patch
|
vlad
:
review+
|
Details | Diff | Splinter Review |
http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/gfx/cairo/cairo/src/cairo-cff-subset.c&rev=1.1&mark=167,171#168
[167] } else if (i >= -1131 && i <= -108) {
168 i = -i - 108;
169 vladimir 1.1 *p++ = (i >> 8)+ 251;
170 *p++ = i & 0xff;
[171] } else if (i >= -1131 && i <= -108) {
if the condition at [167] is false the condition at [171] is also false.
if the condition at [167] is true the [171] is not reached because of else.
in addition this function seems to do uselesss operation on |i|.
172 *p++ = 28;
Reporter | ||
Updated•18 years ago
|
Assignee: general → general
Component: General → GFX
Keywords: coverity
Product: Mozilla Application Suite → Core
QA Contact: general → ian
Updated•18 years ago
|
Assignee: general → nobody
Component: GFX → GFX: Thebes
QA Contact: ian → thebes
Assignee | ||
Comment 1•17 years ago
|
||
What should a patch do here? Just remove the "else if" at line 171?
Reporter | ||
Comment 2•17 years ago
|
||
(In reply to comment #1)
> What should a patch do here? Just remove the "else if" at line 171?
>
not quite sure, can't get the context. it is possible that the condition must be different and the block present.
I have fixed this bug in cairo 1.5.1
http://gitweb.freedesktop.org/?p=cairo;a=commit;h=f52aa4c13e91339e575ca2c52c9e3a1f4d95b106
Line 171 should be
} else if (i >= -32768 && i <= 32767) {
The effect of this bug is that some integers are encoded with five bytes instead of three resulting in a slightly larger subsetted font.
Assignee | ||
Comment 4•17 years ago
|
||
Trivial fix based on <http://gitweb.freedesktop.org/?p=cairo;a=blobdiff;h=55e0f1575aa9eb79a32ddd22c26722422db5c536;hp=2adc709c0bdef6e91ec9efe0234b5ba6b17122ce;hb=f52aa4c13e91339e575ca2c52c9e3a1f4d95b106;f=src/cairo-cff-subset.c>.
Assignee: nobody → ehsan.akhgari
Status: NEW → ASSIGNED
Attachment #275092 -
Flags: review?(vladimir)
Assignee | ||
Updated•17 years ago
|
Target Milestone: --- → mozilla1.9 M8
Attachment #275092 -
Flags: review?(vladimir) → review+
Assignee | ||
Updated•17 years ago
|
Keywords: checkin-needed
Whiteboard: [checkin needed]
Updated•17 years ago
|
Whiteboard: [checkin needed]
Comment 5•17 years ago
|
||
Near as I can tell from the clear-as-mud approval rules, you need approval1.9+ before you're checkin-needed.
Keywords: checkin-needed
Updated•17 years ago
|
Attachment #275092 -
Flags: approval1.9?
Comment 6•17 years ago
|
||
vlad: can you approve this/push it upstream?
(In reply to comment #6)
> vlad: can you approve this/push it upstream?
The patch is my patch from upstream.
As the bug doesn't actually break anything (the effect is about a 1% increase in embedded font size in PDFs) I would suggest waiting for the next cairo upgrade to pull in the fix.
Assignee | ||
Comment 8•17 years ago
|
||
(In reply to comment #7)
> As the bug doesn't actually break anything (the effect is about a 1% increase
> in embedded font size in PDFs) I would suggest waiting for the next cairo
> upgrade to pull in the fix.
So, should we close this bug?
Updated•17 years ago
|
Attachment #275092 -
Flags: approval1.9?
Comment 9•17 years ago
|
||
Yes, fixed by bug 395449.
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Updated•6 years ago
|
Blocks: coverity-analysis
You need to log in
before you can comment on or make changes to this bug.
Description
•