Changeset 166726 in webkit
- Timestamp:
- Apr 3, 2014 9:48:23 AM (10 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r166717 r166726 1 2014-04-03 Bem Jones-Bey <bjonesbe@adobe.com> 2 3 [CSS Shapes] CRASH with calc() value args in inset round 4 https://bugs.webkit.org/show_bug.cgi?id=129816 5 6 Reviewed by Andreas Kling. 7 8 Simple test to make sure that using calc in the round argument of an 9 inset doesn't cause a crash. 10 11 * fast/shapes/shape-outside-floats/shape-outside-inset-round-calc-crash-expected.txt: Added. 12 * fast/shapes/shape-outside-floats/shape-outside-inset-round-calc-crash.html: Added. 13 1 14 2014-04-03 Javier Fernandez <jfernandez@igalia.com> 2 15 -
trunk/Source/WebCore/ChangeLog
r166722 r166726 1 2014-04-03 Bem Jones-Bey <bjonesbe@adobe.com> 2 3 [CSS Shapes] CRASH with calc() value args in inset round 4 https://bugs.webkit.org/show_bug.cgi?id=129816 5 6 Reviewed by Andreas Kling. 7 8 The code to parse the inset rounded corners was adding the parser 9 value arguments to a temporary CSSParserValueList. Unfortunately, 10 CSSParserValueList expects to own the values it contains, and it frees 11 the values it contains when the list is destroyed. This was a problem 12 because the values are owned by the CSSParserValueList passed in to 13 parseInsetRoundedCorners, and thus the calc's argument list would get 14 double freed, resulting in a crash. This patch fixes this by using a 15 Vector to hold the pointers instead. 16 17 Test: fast/shapes/shape-outside-floats/shape-outside-inset-round-calc-crash.html 18 19 * css/CSSParser.cpp: 20 (WebCore::CSSParser::parseInsetRoundedCorners): 21 1 22 2014-04-03 Jer Noble <jer.noble@apple.com> 2 23 -
trunk/Source/WebCore/css/CSSParser.cpp
r166712 r166726 5348 5348 return nullptr; 5349 5349 5350 std::unique_ptr<CSSParserValueList> radiusArguments(new CSSParserValueList);5350 Vector<CSSParserValue*> radiusArguments; 5351 5351 while (argument) { 5352 radiusArguments ->addValue(*argument);5352 radiusArguments.append(argument); 5353 5353 argument = args->next(); 5354 5354 } 5355 5355 5356 unsigned num = radiusArguments ->size();5356 unsigned num = radiusArguments.size(); 5357 5357 if (!num || num > 9) 5358 5358 return nullptr; … … 5362 5362 unsigned indexAfterSlash = 0; 5363 5363 for (unsigned i = 0; i < num; ++i) { 5364 CSSParserValue* value = radiusArguments ->valueAt(i);5364 CSSParserValue* value = radiusArguments.at(i); 5365 5365 if (value->unit == CSSParserValue::Operator) { 5366 5366 if (value->iValue != '/')
Note: See TracChangeset
for help on using the changeset viewer.