Changeset 71277 in webkit
- Timestamp:
- Nov 3, 2010 3:58:30 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r71276 r71277 1 2010-11-03 Adam Barth <abarth@webkit.org> 2 3 Reviewed by Eric Seidel. 4 5 CG use of WebKit image decoders crashes on some animated GIFs 6 https://bugs.webkit.org/show_bug.cgi?id=48955 7 8 Test image from Wikipedia that was crashing. 9 10 * fast/images/dont-crash-with-null-gif-frames-expected.txt: Added. 11 * fast/images/dont-crash-with-null-gif-frames.html: Added. 12 * fast/images/resources/quicksort.gif: Added. 13 1 14 2010-11-03 Csaba Osztrogonác <ossy@webkit.org> 2 15 -
trunk/WebCore/ChangeLog
r71274 r71277 1 2010-11-03 Adam Barth <abarth@webkit.org> 2 3 Reviewed by Eric Seidel. 4 5 CG use of WebKit image decoders crashes on some animated GIFs 6 https://bugs.webkit.org/show_bug.cgi?id=48955 7 8 It turns out CFDataGetMutableBytePtr isn't safe call on a null pointer. 9 10 Test: fast/images/dont-crash-with-null-gif-frames.html 11 12 * platform/image-decoders/cg/ImageDecoderCG.cpp: 13 (WebCore::RGBA32Buffer::copyReferenceToBitmapData): 14 (WebCore::RGBA32Buffer::copyBitmapData): 15 1 16 2010-11-03 Adrienne Walker <enne@google.com> 2 17 -
trunk/WebCore/platform/image-decoders/cg/ImageDecoderCG.cpp
r71098 r71277 32 32 namespace WebCore { 33 33 34 static RGBA32Buffer::PixelData* getPtrAsPixelData(CFMutableDataRef data) 35 { 36 return data ? reinterpret_cast<RGBA32Buffer::PixelData*>(CFDataGetMutableBytePtr(data)) : 0; 37 } 38 34 39 void RGBA32Buffer::copyReferenceToBitmapData(const RGBA32Buffer& other) 35 40 { 36 41 ASSERT(this != &other); 37 42 m_backingStore = other.m_backingStore; 38 m_bytes = reinterpret_cast<PixelData*>(CFDataGetMutableBytePtr(m_backingStore.get()));43 m_bytes = getPtrAsPixelData(m_backingStore.get()); 39 44 // FIXME: The rest of this function seems redundant with RGBA32Buffer::copyBitmapData. 40 45 m_size = other.m_size; … … 48 53 49 54 m_backingStore.adoptCF(CFDataCreateMutableCopy(kCFAllocatorDefault, 0, other.m_backingStore.get())); 50 m_bytes = reinterpret_cast<PixelData*>(CFDataGetMutableBytePtr(m_backingStore.get()));55 m_bytes = getPtrAsPixelData(m_backingStore.get()); 51 56 m_size = other.m_size; 52 57 setHasAlpha(other.m_hasAlpha);
Note: See TracChangeset
for help on using the changeset viewer.