Changeset 249087 in webkit
- Timestamp:
- Aug 24, 2019, 9:02:52 AM (7 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
NetworkProcess/cache/CacheStorageEngineCaches.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r249074 r249087 1 2019-08-24 Chris Dumez <cdumez@apple.com> 2 3 Make CacheStorageEngineCaches's decodeCachesNames() more robust against bad input data 4 https://bugs.webkit.org/show_bug.cgi?id=201102 5 6 Reviewed by Antti Koivisto. 7 8 Use Vector::tryReserveCapacity() instead of Vector::reserveInitialCapacity() in CacheStorage::decodeCachesNames() 9 since the size is read from disk and thus cannot be trusted. If the size is too large, reserveInitialCapacity() 10 would end up crashing the network process. Now, we merely discard the data if tryReserveCapacity() fails because 11 the size is too large. 12 13 * NetworkProcess/cache/CacheStorageEngineCaches.cpp: 14 (WebKit::CacheStorage::decodeCachesNames): 15 1 16 2019-08-23 Wenson Hsieh <wenson_hsieh@apple.com> 2 17 -
trunk/Source/WebKit/NetworkProcess/cache/CacheStorageEngineCaches.cpp
r245715 r249087 412 412 413 413 Vector<std::pair<String, String>> names; 414 names.reserveInitialCapacity(count); 414 if (!names.tryReserveCapacity(count)) 415 return makeUnexpected(Error::ReadDisk); 416 415 417 for (size_t index = 0; index < count; ++index) { 416 418 String name;
Note:
See TracChangeset
for help on using the changeset viewer.