Index: src/core/SkImageFilter.cpp |
diff --git a/src/core/SkImageFilter.cpp b/src/core/SkImageFilter.cpp |
index cca22bba5596eb7a99dc4762a3e63655f9d0a835..aadf9040b0403ae1ef8d256e73f6f1aad8d2c5e5 100644 |
--- a/src/core/SkImageFilter.cpp |
+++ b/src/core/SkImageFilter.cpp |
@@ -53,9 +53,9 @@ SkImageFilter::~SkImageFilter() { |
delete[] fInputs; |
} |
-SkImageFilter::SkImageFilter(int maxInputCount, SkFlattenableReadBuffer& buffer) { |
+SkImageFilter::SkImageFilter(int inputCount, SkFlattenableReadBuffer& buffer) { |
fInputCount = buffer.readInt(); |
- if (buffer.validate((fInputCount >= 0) && (fInputCount <= maxInputCount))) { |
+ if (buffer.validate((fInputCount >= 0) && ((inputCount < 0) || (fInputCount == inputCount)))) { |
fInputs = new SkImageFilter*[fInputCount]; |
for (int i = 0; i < fInputCount; i++) { |
if (buffer.readBool()) { |