aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/effects/SkBicubicImageFilter.cpp
diff options
context:
space:
mode:
authorGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-09-16 13:40:12 +0000
committerGravatar robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-09-16 13:40:12 +0000
commitba6e954140e45e251d67934ed6ad752149fcf72f (patch)
tree2abaa3baddbbf3a75788b7841b9a6bd5e578a1db /src/effects/SkBicubicImageFilter.cpp
parent478884f7d3b8c7be8b62f3fa2b79192f411c3fec (diff)
Revert the revert of 11247, 11250, 11251 and 11279 (Chrome already relies on changes in r11247)
git-svn-id: http://skia.googlecode.com/svn/trunk@11287 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/effects/SkBicubicImageFilter.cpp')
-rw-r--r--src/effects/SkBicubicImageFilter.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/effects/SkBicubicImageFilter.cpp b/src/effects/SkBicubicImageFilter.cpp
index 02e706f355..778df3fd4f 100644
--- a/src/effects/SkBicubicImageFilter.cpp
+++ b/src/effects/SkBicubicImageFilter.cpp
@@ -45,6 +45,10 @@ SkBicubicImageFilter::SkBicubicImageFilter(SkFlattenableReadBuffer& buffer) : IN
SkASSERT(readSize == 16);
fScale.fWidth = buffer.readScalar();
fScale.fHeight = buffer.readScalar();
+ buffer.validate(SkScalarIsFinite(fScale.fWidth) &&
+ SkScalarIsFinite(fScale.fHeight) &&
+ (fScale.fWidth >= 0) &&
+ (fScale.fHeight >= 0));
}
void SkBicubicImageFilter::flatten(SkFlattenableWriteBuffer& buffer) const {