Closed Bug 710992 Opened 13 years ago Closed 13 years ago

Possible bad memset in pixman_image_set_transform()

Categories

(Core :: Graphics, defect)

defect
Not set
normal

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)

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)
Blocks: 710966
Whiteboard: [pvs-studio] → [pvs-studio][good first bug][lang=c++]
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
Whiteboard: [pvs-studio][good first bug][lang=c++] → [pvs-studio][good first bug][lang=c++][mentor=jwein]
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+
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"
Sorry - did not know that. Fixed now!
Attachment #582616 - Attachment is obsolete: true
Attachment #582616 - Flags: review?(roc)
Attachment #582686 - Flags: review?(roc)
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?
I'll land it.
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla12
Version: unspecified → Trunk
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
Attachment #582133 - Flags: checkin?
Attachment #582686 - Flags: checkin?
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: