Skip to content

Commit

Permalink
Document where PlatformHandle validation happens in ipcz
Browse files Browse the repository at this point in the history
ChannelMac says `incoming_handles_` should be validated, but where this
happens when using GetReadPlatformHandlesForIpcz() is not clear.

Change-Id: I8f1aeeb58fffdac15c86fb15ec82e53af238640b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4995345
Reviewed-by: Ken Rockot <rockot@google.com>
Commit-Queue: Robert Sesek <rsesek@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1217740}
  • Loading branch information
rsesek authored and Chromium LUCI CQ committed Oct 31, 2023
1 parent 801eac3 commit b1d0b19
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mojo/core/channel_mac.cc
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,10 @@ class ChannelMac : public Channel,
return true;
}

// Unlike GetReadPlatformHandles(), this does not validate the underlying
// PlatformHandle type here. Instead, ipcz does this in
// ipcz::Message::DeserializeFromTransport(), which is called by
// the AcceptParcel message deserializer (OnAcceptParcel).
bool GetReadPlatformHandlesForIpcz(
size_t num_handles,
std::vector<PlatformHandle>& handles) override {
Expand Down

0 comments on commit b1d0b19

Please sign in to comment.