зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1865046 - Check ProtocolId cast in IPC fuzzer. r=truber
Differential Revision: https://phabricator.services.mozilla.com/D193772
This commit is contained in:
Родитель
1cf9f72db5
Коммит
01f1337180
|
@ -587,7 +587,12 @@ bool IPCFuzzController::MakeTargetDecision(
|
|||
} else if (isPreserveHeader) {
|
||||
// In preserveHeaderMode, we need to find an actor that matches the
|
||||
// requested message type instead of any random actor.
|
||||
ProtocolId wantedProtocolId = static_cast<ProtocolId>(*type >> 16);
|
||||
uint16_t maybeProtocolId = *type >> 16;
|
||||
if (maybeProtocolId >= IPCMessageStart::LastMsgIndex) {
|
||||
// Not a valid protocol.
|
||||
return false;
|
||||
}
|
||||
ProtocolId wantedProtocolId = static_cast<ProtocolId>(maybeProtocolId);
|
||||
std::vector<uint32_t> allowedIndices;
|
||||
for (uint32_t i = 0; i < actors.size(); ++i) {
|
||||
if (actors[i].second == wantedProtocolId) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче