summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/graphics/skia
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2011-07-13 10:14:36 +0100
committerBen Murdoch <benm@google.com>2011-07-13 11:03:14 +0100
commitd0147a863b872ecaa451ab0dce2a348760e99e2c (patch)
treeb4819830b7ab03f384ed8ab83734ac0f46193263 /Source/WebCore/platform/graphics/skia
parent65b45b34343dc5d5b9dbeda52e9de428e146c8f7 (diff)
downloadexternal_webkit-d0147a863b872ecaa451ab0dce2a348760e99e2c.zip
external_webkit-d0147a863b872ecaa451ab0dce2a348760e99e2c.tar.gz
external_webkit-d0147a863b872ecaa451ab0dce2a348760e99e2c.tar.bz2
Merge WebKit at branches/chromium/742 r89068: Initial merge by Git.
Take us to top of Chrome 12 release branch (12.0.742.130) Change-Id: I4408a97e343a118cf4a1bb9d71367bcc2c16ae48
Diffstat (limited to 'Source/WebCore/platform/graphics/skia')
-rw-r--r--Source/WebCore/platform/graphics/skia/ImageBufferSkia.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/WebCore/platform/graphics/skia/ImageBufferSkia.cpp b/Source/WebCore/platform/graphics/skia/ImageBufferSkia.cpp
index 2352672..2a1738a 100644
--- a/Source/WebCore/platform/graphics/skia/ImageBufferSkia.cpp
+++ b/Source/WebCore/platform/graphics/skia/ImageBufferSkia.cpp
@@ -168,6 +168,10 @@ template <Multiply multiplied>
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();