Changeset 280837 in webkit
- Timestamp:
- Aug 10, 2021, 2:31:51 AM (5 years ago)
- Location:
- releases/WebKitGTK/webkit-2.32/Source/WebKit
- Files:
-
- 3 edited
-
ChangeLog (modified) (1 diff)
-
Shared/Cocoa/SandboxExtensionCocoa.mm (modified) (3 diffs)
-
Shared/SandboxExtension.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
releases/WebKitGTK/webkit-2.32/Source/WebKit/ChangeLog
r280836 r280837 1 2021-03-09 Chris Dumez <cdumez@apple.com> 2 3 [IPC Hardening] SandboxExtension::HandleArray IPC decoder should not call Vector::resize() 4 https://bugs.webkit.org/show_bug.cgi?id=222977 5 <rdar://problem/75218451> 6 7 Reviewed by Anders Carlsson. 8 9 SandboxExtension::HandleArray IPC decoder should not call Vector::resize() with an untrusted size 10 coming from IPC. Instead, call Vector::append(), like the Vector IPC decoder does. 11 12 * Shared/Cocoa/SandboxExtensionCocoa.mm: 13 (WebKit::SandboxExtension::HandleArray::append): 14 (WebKit::SandboxExtension::HandleArray::decode): 15 * Shared/SandboxExtension.h: 16 (WebKit::SandboxExtension::append): 17 1 18 2021-03-09 Chris Dumez <cdumez@apple.com> 2 19 -
releases/WebKitGTK/webkit-2.32/Source/WebKit/Shared/Cocoa/SandboxExtensionCocoa.mm
r265303 r280837 188 188 } 189 189 190 void SandboxExtension::HandleArray::append(Handle&& handle) 191 { 192 m_data.append(WTFMove(handle)); 193 } 194 190 195 SandboxExtension::Handle& SandboxExtension::HandleArray::operator[](size_t i) 191 196 { … … 218 223 if (!size) 219 224 return WTF::nullopt; 225 220 226 SandboxExtension::HandleArray handles; 221 handles.allocate(*size);222 227 for (size_t i = 0; i < *size; ++i) { 223 228 Optional<SandboxExtension::Handle> handle; … … 225 230 if (!handle) 226 231 return WTF::nullopt; 227 handles [i] = WTFMove(*handle);232 handles.append(WTFMove(*handle)); 228 233 } 229 234 return WTFMove(handles); -
releases/WebKitGTK/webkit-2.32/Source/WebKit/Shared/SandboxExtension.h
r263288 r280837 91 91 ~HandleArray(); 92 92 void allocate(size_t); 93 void append(Handle&&); 93 94 Handle& operator[](size_t i); 94 95 Handle& at(size_t i) { return operator[](i); } … … 150 151 inline SandboxExtension::HandleArray::~HandleArray() { } 151 152 inline void SandboxExtension::HandleArray::allocate(size_t) { } 153 inline void SandboxExtension::HandleArray::append(Handle&&) { } 152 154 inline size_t SandboxExtension::HandleArray::size() const { return 0; } 153 155 inline const SandboxExtension::Handle& SandboxExtension::HandleArray::operator[](size_t) const { return m_emptyHandle; }
Note:
See TracChangeset
for help on using the changeset viewer.