Changeset 284789 in webkit
- Timestamp:
- Oct 25, 2021, 10:25:55 AM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
platform/graphics/cocoa/HEVCUtilitiesCocoa.mm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r284782 r284789 1 2021-10-25 Darin Adler <darin@apple.com> 2 3 Restore strict parsing behavior in parseStringArrayFromDictionaryToUInt16Vector 4 https://bugs.webkit.org/show_bug.cgi?id=232218 5 6 Reviewed by Sam Weinig. 7 8 * platform/graphics/cocoa/HEVCUtilitiesCocoa.mm: 9 (WebCore::parseStringArrayFromDictionaryToUInt16Vector): Make sure the entire parse 10 fails if any of the elements in the array are either not strings, or do not parse 11 successfully as a uint16_t. 12 1 13 2021-10-25 Alan Bujtas <zalan@apple.com> 2 14 -
trunk/Source/WebCore/platform/graphics/cocoa/HEVCUtilitiesCocoa.mm
r284763 r284789 142 142 if (!array) 143 143 return std::nullopt; 144 return makeVector(bridge_cast(array), [] (id value) { 145 return parseInteger<uint16_t>(String(dynamic_objc_cast<NSString>(value))); 144 bool parseFailed = false; 145 auto result = makeVector(bridge_cast(array), [&] (id value) { 146 auto parseResult = parseInteger<uint16_t>(String(dynamic_objc_cast<NSString>(value))); 147 parseFailed |= !parseResult; 148 return parseResult; 146 149 }); 150 if (parseFailed) 151 return std::nullopt; 152 return result; 147 153 } 148 154
Note:
See TracChangeset
for help on using the changeset viewer.