Title: [88850] branches/chromium/742/Source/WebCore/platform/graphics/skia/ImageBufferSkia.cpp
- Revision
- 88850
- Author
- [email protected]
- Date
- 2011-06-14 13:50:35 -0700 (Tue, 14 Jun 2011)
Log Message
Merge 87439
BUG=83270
Review URL: http://codereview.chromium.org/7166003
Modified Paths
Diff
Modified: branches/chromium/742/Source/WebCore/platform/graphics/skia/ImageBufferSkia.cpp (88849 => 88850)
--- branches/chromium/742/Source/WebCore/platform/graphics/skia/ImageBufferSkia.cpp 2011-06-14 20:41:34 UTC (rev 88849)
+++ branches/chromium/742/Source/WebCore/platform/graphics/skia/ImageBufferSkia.cpp 2011-06-14 20:50:35 UTC (rev 88850)
@@ -168,6 +168,10 @@
PassRefPtr<ByteArray> getImageData(const IntRect& rect, SkDevice& srcDevice,
const IntSize& size)
{
+ float area = 4.0f * rect.width() * rect.height();
+ if (area > static_cast<float>(std::numeric_limits<int>::max()))
+ return 0;
+
RefPtr<ByteArray> result = ByteArray::create(rect.width() * rect.height() * 4);
SkBitmap::Config srcConfig = srcDevice.accessBitmap(false).config();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes