mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 15:23:51 +00:00
Bug 1485762 - when deserializing a shmem in IPC, error if the ID doesn't point to a valid shmem segment; r=jld
Differential Revision: https://phabricator.services.mozilla.com/D4141 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
f81e9b49d1
commit
9b811a260c
@ -515,13 +515,12 @@ IPDLParamTraits<Shmem>::Read(const IPC::Message* aMsg, PickleIterator* aIter,
|
||||
}
|
||||
|
||||
Shmem::SharedMemory* rawmem = aActor->LookupSharedMemory(id);
|
||||
if (rawmem) {
|
||||
*aResult = Shmem(
|
||||
Shmem::PrivateIPDLCaller(),
|
||||
rawmem, id);
|
||||
return true;
|
||||
if (!rawmem) {
|
||||
return false;
|
||||
}
|
||||
*aResult = Shmem();
|
||||
*aResult = Shmem(
|
||||
Shmem::PrivateIPDLCaller(),
|
||||
rawmem, id);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user