Closed
Bug 710992
Opened 13 years ago
Closed 13 years ago
Possible bad memset in pixman_image_set_transform()
Categories
(Core :: Graphics, defect)
Core
Graphics
Tracking
()
RESOLVED
FIXED
mozilla12
People
(Reporter: Dolske, Assigned: prip)
References
Details
(Whiteboard: [pvs-studio][good first bug][lang=c++][mentor=jwein])
Attachments
(2 files, 1 obsolete file)
873 bytes,
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
2.00 KB,
patch
|
roc
:
review+
|
Details | Diff | Splinter Review |
From http://www.viva64.com/en/a/0078/,
13th section in http://www.viva64.com/external-pictures/txt/mozilla-test.txt
V575 The 'memcmp' function processes '0' elements. Inspect the third argument.
pixman-image.c 520
pixman_bool_t
pixman_image_set_transform (...)
{
memcmp (common->transform, transform, sizeof (pixman_transform_t) == 0))
}
I think there could be written like this.
memcmp (common->transform, transform, sizeof (pixman_transform_t)) == 0)
Updated•13 years ago
|
Whiteboard: [pvs-studio] → [pvs-studio][good first bug][lang=c++]
Assignee | ||
Comment 1•13 years ago
|
||
Comment 2•13 years ago
|
||
prip: When you are happy with the state of the patch, please request review from roc by setting the "review?" flag to "roc@ocallahan.org". Thanks for your contribution!
Assignee: nobody → thomas
Status: NEW → ASSIGNED
Updated•13 years ago
|
Whiteboard: [pvs-studio][good first bug][lang=c++] → [pvs-studio][good first bug][lang=c++][mentor=jwein]
Assignee | ||
Updated•13 years ago
|
Attachment #582133 -
Flags: review?(roc)
Comment on attachment 582133 [details] [diff] [review]
Bug 710992 - Fix third argument in memcmp call in pixman-image.c
Review of attachment 582133 [details] [diff] [review]:
-----------------------------------------------------------------
This is good. For landing, however, the patch needs to be prepped as a patch in gfx/cairo. See the README there for examples.
Also, this patch really needs to go upstream. Probably should post it to the cairo mailing list.
Attachment #582133 -
Flags: review?(roc) → review+
Assignee | ||
Comment 4•13 years ago
|
||
Prepped as gfx/cairo-patch
Attachment #582133 -
Attachment is obsolete: true
Attachment #582616 -
Flags: review?(roc)
Comment on attachment 582616 [details] [diff] [review]
Bug 710992 - Fix third argument in memcmp call in pixman-image.c
+bad-memset.patch: Fix third argument in memcmp call in pixman-image.c
This belongs under "pixman patches"
Assignee | ||
Comment 6•13 years ago
|
||
Sorry - did not know that. Fixed now!
Attachment #582616 -
Attachment is obsolete: true
Attachment #582616 -
Flags: review?(roc)
Attachment #582686 -
Flags: review?(roc)
Attachment #582686 -
Flags: review?(roc) → review+
Attachment #582686 -
Flags: checkin?
Comment 7•13 years ago
|
||
In addition to the patch, doesn't the change also need to be made to the actual file?
Comment on attachment 582133 [details] [diff] [review]
Bug 710992 - Fix third argument in memcmp call in pixman-image.c
You're right, Ed. We can just land both of these patches.
Attachment #582133 -
Attachment is obsolete: false
Attachment #582133 -
Flags: checkin?
Comment 9•13 years ago
|
||
I'll land it.
Comment 10•13 years ago
|
||
Thanks for the patch.
https://hg.mozilla.org/mozilla-central/rev/7d23dd6c50eb
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla12
Version: unspecified → Trunk
Comment 11•13 years ago
|
||
When you discover bugs in pixman, please report them upstream as well.
Bug reports and patches can be sent to
pixman@lists.freedesktop.org
or filed here:
https://bugs.freedesktop.org/enter_bug.cgi?product=pixman
Updated•13 years ago
|
Attachment #582133 -
Flags: checkin?
Updated•13 years ago
|
Attachment #582686 -
Flags: checkin?
You need to log in
before you can comment on or make changes to this bug.
Description
•