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

Unified Diff: Source/core/svg/SVGFEColorMatrixElement.cpp

Issue 1075413002: Explicitly enforce values size in feColorMatrix. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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
« no previous file with comments | « no previous file | Source/platform/graphics/filters/FEColorMatrix.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGFEColorMatrixElement.cpp
diff --git a/Source/core/svg/SVGFEColorMatrixElement.cpp b/Source/core/svg/SVGFEColorMatrixElement.cpp
index ad659d2fb97672c7ce24838030e85707b0390b71..58f6cb35725f13657618c1f485b268b0e85b1760 100644
--- a/Source/core/svg/SVGFEColorMatrixElement.cpp
+++ b/Source/core/svg/SVGFEColorMatrixElement.cpp
@@ -77,8 +77,12 @@ bool SVGFEColorMatrixElement::setFilterEffectAttribute(FilterEffect* effect, con
FEColorMatrix* colorMatrix = static_cast<FEColorMatrix*>(effect);
if (attrName == SVGNames::typeAttr)
return colorMatrix->setType(m_type->currentValue()->enumValue());
- if (attrName == SVGNames::valuesAttr)
- return colorMatrix->setValues(m_values->currentValue()->toFloatVector());
+ if (attrName == SVGNames::valuesAttr) {
+ Vector<float> values = m_values->currentValue()->toFloatVector();
+ if (values.size() == 20)
pdr. 2015/04/10 20:59:39 In a followup could you move this to be a named co
+ return colorMatrix->setValues(m_values->currentValue()->toFloatVector());
+ return false;
+ }
ASSERT_NOT_REACHED();
return false;
« no previous file with comments | « no previous file | Source/platform/graphics/filters/FEColorMatrix.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698