Changeset 260861 in webkit
- Timestamp:
- Apr 28, 2020 8:03:09 PM (4 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r260857 r260861 1 2020-04-28 David Kilzer <ddkilzer@apple.com> 2 3 IPC::Decoder::isValid() should just be a nullptr check 4 <https://webkit.org/b/211152> 5 <rdar://problem/62552699> 6 7 Reviewed by Darin Adler. 8 9 * Platform/IPC/Decoder.h: 10 (IPC::Decoder::isValid const): Change to nullptr check. I 11 reviewed the code in Decoder.{cpp,h}, and I didn't see 12 m_bufferPos being set without a bounds check. Also added 13 WARN_UNUSED_RETURN to make sure the result is always checked. 14 1 15 2020-04-28 Daniel Bates <dabates@apple.com> 2 16 -
trunk/Source/WebKit/Platform/IPC/Decoder.h
r260704 r260861 72 72 size_t length() const { return m_bufferEnd - m_buffer; } 73 73 74 bool isValid() const 75 { 76 // (m_bufferPos == m_bufferEnd) is a valid state for decoding if the last parameter 77 // is a variable length byte array and its size == 0. 78 return m_bufferPos >= m_buffer && m_bufferPos <= m_bufferEnd; 79 } 74 WARN_UNUSED_RETURN bool isValid() const { return m_bufferPos != nullptr; } 80 75 void markInvalid() { m_bufferPos = nullptr; } 81 76
Note: See TracChangeset
for help on using the changeset viewer.