Changeset 260527 in webkit


Ignore:
Timestamp:
Apr 22, 2020 12:14:59 PM (4 years ago)
Author:
ddkilzer@apple.com
Message:

IPC::decodeSharedBuffer() should check the return value of SharedMemory::map()
<https://webkit.org/b/210844>
<rdar://problem/60773120>

Reviewed by Geoffrey Garen.

  • Shared/WebCoreArgumentCoders.cpp:

(IPC::decodeSharedBuffer):

  • Add nullptr check and early return.
Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r260516 r260527  
     12020-04-22  David Kilzer  <ddkilzer@apple.com>
     2
     3        IPC::decodeSharedBuffer() should check the return value of SharedMemory::map()
     4        <https://webkit.org/b/210844>
     5        <rdar://problem/60773120>
     6
     7        Reviewed by Geoffrey Garen.
     8
     9        * Shared/WebCoreArgumentCoders.cpp:
     10        (IPC::decodeSharedBuffer):
     11        - Add nullptr check and early return.
     12
    1132020-04-22  Brent Fulgham  <bfulgham@apple.com>
    214
  • trunk/Source/WebKit/Shared/WebCoreArgumentCoders.cpp

    r259937 r260527  
    176176
    177177    auto sharedMemoryBuffer = SharedMemory::map(handle, SharedMemory::Protection::ReadOnly);
     178    if (!sharedMemoryBuffer)
     179        return false;
     180
    178181    buffer = SharedBuffer::create(static_cast<unsigned char*>(sharedMemoryBuffer->data()), bufferSize);
    179182#endif
Note: See TracChangeset for help on using the changeset viewer.