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

Unified Diff: Source/platform/graphics/filters/FEColorMatrix.h

Issue 1087283002: Rework the checks for too-few values in feColorMatrix filter. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Better tests Created 5 years, 8 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: Source/platform/graphics/filters/FEColorMatrix.h
diff --git a/Source/platform/graphics/filters/FEColorMatrix.h b/Source/platform/graphics/filters/FEColorMatrix.h
index 2ae8be952b30f45579791ed43d2dd2b711c9f34c..469621cf70bbc18c42ad8edb29a42cbc28021b4b 100644
--- a/Source/platform/graphics/filters/FEColorMatrix.h
+++ b/Source/platform/graphics/filters/FEColorMatrix.h
@@ -59,6 +59,9 @@ private:
virtual bool affectsTransparentPixels() override;
ColorMatrixType m_type;
+
+ // The m_values vector may not contain the right number of values. Always check
+ // before accessing contents.
Vector<float> m_values;
};

Powered by Google App Engine
This is Rietveld 408576698