Closed Bug 604495 Opened 14 years ago Closed 14 years ago

Memory corruption in the GIF decoder destruction

Categories

(Core :: Graphics: ImageLib, defect)

defect
Not set
critical

Tracking

()

RESOLVED FIXED
mozilla2.0b7
Tracking Status
blocking2.0 --- final+

People

(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)

References

Details

(Keywords: crash, regression)

Attachments

(1 file)

We use moz_xmalloc (which maps to je_malloc on jemalloc enabled builds) to allocate mGIFStruct.local_colormap, and then we free it using PR_FREEIF which maps to PRFree which in turn maps to stdlib's free.  This means that we allocate memory from one heap and try to free it on another.

If we're lucky, this means that we're leaking.  If we're not lucky, it means that we're crashing, or corrupting arbitrary memory, or worse.
Keywords: crash
Version: unspecified → Trunk
Attached patch Patch (v1)Splinter Review
Attachment #483280 - Flags: review?(joe)
This should block 2.0, and also branches if we do the same thing there as well.
blocking2.0: --- → ?
This is a regression from http://hg.mozilla.org/mozilla-central/rev/389e836517bc (bug 514033), so I guess it is not applicable to branches.
Blocks: 514033
Keywords: regression
Attachment #483280 - Flags: review?(joe) → review+
blocking2.0: ? → final+
Whiteboard: [needs landing]
http://hg.mozilla.org/mozilla-central/rev/21c846fa8e89
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Whiteboard: [needs landing]
Target Milestone: --- → mozilla2.0b8
Target Milestone: mozilla2.0b8 → mozilla2.0b7
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: