Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(469)

Unified Diff: src/effects/SkColorMatrixFilter.cpp

Issue 23021015: Initial error handling code (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Comments fixed Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/effects/SkColorMatrixFilter.cpp
diff --git a/src/effects/SkColorMatrixFilter.cpp b/src/effects/SkColorMatrixFilter.cpp
index 1e3c779ec661d36e1e8e4aca12acdc769b9555b7..6eb21818d256280536f842c3b2da5dc806e7a673 100644
--- a/src/effects/SkColorMatrixFilter.cpp
+++ b/src/effects/SkColorMatrixFilter.cpp
@@ -310,6 +310,9 @@ SkColorMatrixFilter::SkColorMatrixFilter(SkFlattenableReadBuffer& buffer)
SkASSERT(buffer.getArrayCount() == 20);
buffer.readScalarArray(fMatrix.fMat);
this->initState(fMatrix.fMat);
+ for (int i = 0; i < 20; ++i) {
+ buffer.validate(SkScalarIsFinite(fMatrix.fMat[0]));
mtklein 2013/10/16 18:54:09 fMat[i]?
sugoi1 2013/10/16 20:07:41 ouf... good catch! Fixed
+ }
}
bool SkColorMatrixFilter::asColorMatrix(SkScalar matrix[20]) const {

Powered by Google App Engine
This is Rietveld 408576698