Title: [87439] trunk/Source/WebCore
- Revision
- 87439
- Author
- [email protected]
- Date
- 2011-05-26 15:30:53 -0700 (Thu, 26 May 2011)
Log Message
2011-05-26 James Robinson <[email protected]>
Reviewed by Darin Fisher.
[skia] Add area check to ImageBufferData::getImageData
https://bugs.webkit.org/show_bug.cgi?id=61375
No change in behavior, just a sanity check.
* platform/graphics/skia/ImageBufferSkia.cpp:
(WebCore::getImageData):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (87438 => 87439)
--- trunk/Source/WebCore/ChangeLog 2011-05-26 22:09:55 UTC (rev 87438)
+++ trunk/Source/WebCore/ChangeLog 2011-05-26 22:30:53 UTC (rev 87439)
@@ -1,3 +1,15 @@
+2011-05-26 James Robinson <[email protected]>
+
+ Reviewed by Darin Fisher.
+
+ [skia] Add area check to ImageBufferData::getImageData
+ https://bugs.webkit.org/show_bug.cgi?id=61375
+
+ No change in behavior, just a sanity check.
+
+ * platform/graphics/skia/ImageBufferSkia.cpp:
+ (WebCore::getImageData):
+
2011-05-26 Levi Weintraub <[email protected]>
Reviewed by Eric Seidel.
Modified: trunk/Source/WebCore/platform/graphics/skia/ImageBufferSkia.cpp (87438 => 87439)
--- trunk/Source/WebCore/platform/graphics/skia/ImageBufferSkia.cpp 2011-05-26 22:09:55 UTC (rev 87438)
+++ trunk/Source/WebCore/platform/graphics/skia/ImageBufferSkia.cpp 2011-05-26 22:30:53 UTC (rev 87439)
@@ -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