| Index: Source/core/css/parser/CSSPropertyParser.cpp
|
| diff --git a/Source/core/css/parser/CSSPropertyParser.cpp b/Source/core/css/parser/CSSPropertyParser.cpp
|
| index b2ce03f94f44094b1b6cff863858474c8d3e6b54..b1e2d1cc5495c2fe930e1888fa1f0c29ba8014eb 100644
|
| --- a/Source/core/css/parser/CSSPropertyParser.cpp
|
| +++ b/Source/core/css/parser/CSSPropertyParser.cpp
|
| @@ -3579,8 +3579,8 @@ bool CSSPropertyParser::parseGridTrackRepeatFunction(CSSValueList& list)
|
| if (!arguments || arguments->size() < 3 || !validUnit(arguments->valueAt(0), FPositiveInteger) || !isComma(arguments->valueAt(1)))
|
| return false;
|
|
|
| - size_t repetitions = arguments->valueAt(0)->fValue;
|
| - ASSERT_WITH_SECURITY_IMPLICATION(repetitions > 0);
|
| + ASSERT(arguments->valueAt(0)->fValue > 0);
|
| + size_t repetitions = clampTo<size_t>(arguments->valueAt(0)->fValue, 0, kGridMaxTracks);
|
|
|
| RefPtrWillBeRawPtr<CSSValueList> repeatedValues = CSSValueList::createSpaceSeparated();
|
| arguments->next(); // Skip the repetition count.
|
|
|