WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
23743
Memory smasher in public GIFImageDecoder
https://bugs.webkit.org/show_bug.cgi?id=23743
Summary
Memory smasher in public GIFImageDecoder
Peter Kasting
Reported
2009-02-04 14:36:01 PST
GIFImageDecoder.cpp (both the skia and Cairo versions) has a memory smashing bug. This doesn't affect Safari, but is a topcrash cause for the Chromium trunk. The problem is that clearFrameBufferCache() assumes it only needs to worry about preserving the last complete frame, but initFrameBuffer() and other functions can skip over frames with a DisposeOverwritePrevious disposal method to find prior complete frames. So the code in clearFrameBufferCache() needs to get more complex to take this into account. Additionally, to avoid wasting more memory than we need to, RGBA32Buffer::clear() should only clear the minimum amount of metadata it needs to, because various functions will still need other data after the framebuffer itself is no longer necessary. If we don't change clear() we'd need to clear fewer frames. Patch coming shortly.
Attachments
patch v1
(10.79 KB, patch)
2009-02-04 14:38 PST
,
Peter Kasting
hyatt
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Peter Kasting
Comment 1
2009-02-04 14:38:31 PST
Created
attachment 27329
[details]
patch v1 Note that the Cairo and Skia changes here are identical modulo the RGBA32Buffer members. Just another reminder that I eventually need to merge these into one set of decoders.
Dave Hyatt
Comment 2
2009-02-04 15:27:24 PST
Comment on
attachment 27329
[details]
patch v1 r=me
Peter Kasting
Comment 3
2009-02-04 16:00:43 PST
Fixed in
r40641
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug