Index: Source/core/css/StylePropertySet.cpp |
diff --git a/Source/core/css/StylePropertySet.cpp b/Source/core/css/StylePropertySet.cpp |
index 8df65b850b2c61cd7b3fc2056dc228650bf3e486..50f395951052d14a72ae8e7a2a935b7d674b12ca 100644 |
--- a/Source/core/css/StylePropertySet.cpp |
+++ b/Source/core/css/StylePropertySet.cpp |
@@ -50,6 +50,7 @@ static size_t sizeForImmutableStylePropertySetWithPropertyCount(unsigned count) |
PassRefPtr<ImmutableStylePropertySet> ImmutableStylePropertySet::create(const CSSProperty* properties, unsigned count, CSSParserMode cssParserMode) |
{ |
+ ASSERT(count <= MaxArraySize); |
void* slot = WTF::fastMalloc(sizeForImmutableStylePropertySetWithPropertyCount(count)); |
return adoptRef(new (slot) ImmutableStylePropertySet(properties, count, cssParserMode)); |
} |