Title: [135659] trunk/Source/WebCore
- Revision
- 135659
- Author
- [email protected]
- Date
- 2012-11-24 15:05:07 -0800 (Sat, 24 Nov 2012)
Log Message
[WinCairo] Avoid access violation when frame is NULL.
https://bugs.webkit.org/show_bug.cgi?id=68753
BitmapImage::drawFrameMatchingSourceSize causes an access violation
if BitmapImage::frameAtIndex returns NULL. (Found by David Delaune).
Reviewed by Simon Fraser.
* platform/graphics/win/ImageCairoWin.cpp:
(WebCore::BitmapImage::drawFrameMatchingSourceSize): Check for null
cairo_surface_t pointer and avoid dereferencing.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (135658 => 135659)
--- trunk/Source/WebCore/ChangeLog 2012-11-24 22:25:11 UTC (rev 135658)
+++ trunk/Source/WebCore/ChangeLog 2012-11-24 23:05:07 UTC (rev 135659)
@@ -1,3 +1,17 @@
+2012-11-24 Brent Fulgham <[email protected]>
+
+ [WinCairo] Avoid access violation when frame is NULL.
+ https://bugs.webkit.org/show_bug.cgi?id=68753
+
+ BitmapImage::drawFrameMatchingSourceSize causes an access violation
+ if BitmapImage::frameAtIndex returns NULL. (Found by David Delaune).
+
+ Reviewed by Simon Fraser.
+
+ * platform/graphics/win/ImageCairoWin.cpp:
+ (WebCore::BitmapImage::drawFrameMatchingSourceSize): Check for null
+ cairo_surface_t pointer and avoid dereferencing.
+
2012-11-24 Christophe Dumez <[email protected]>
[EFL] Refactor RenderThemeEfl::getThemePartFromCache()
Modified: trunk/Source/WebCore/platform/graphics/win/ImageCairoWin.cpp (135658 => 135659)
--- trunk/Source/WebCore/platform/graphics/win/ImageCairoWin.cpp 2012-11-24 22:25:11 UTC (rev 135658)
+++ trunk/Source/WebCore/platform/graphics/win/ImageCairoWin.cpp 2012-11-24 23:05:07 UTC (rev 135659)
@@ -96,6 +96,9 @@
size_t frames = frameCount();
for (size_t i = 0; i < frames; ++i) {
cairo_surface_t* image = frameAtIndex(i)->surface();
+ if (!image)
+ continue;
+
if (cairo_image_surface_get_height(image) == static_cast<size_t>(srcSize.height()) && cairo_image_surface_get_width(image) == static_cast<size_t>(srcSize.width())) {
size_t currentFrame = m_currentFrame;
m_currentFrame = i;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes