[Cocoa] Check message IDs when decoding Mach messages in IPC::Connection
authordarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 3 Dec 2018 17:26:38 +0000 (17:26 +0000)
committerdarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 3 Dec 2018 17:26:38 +0000 (17:26 +0000)
commitd73ec781ed6e433cd19b8330ecec98958bc8cca5
tree78de63fbba07872d8be308947b381a0c2b457802
parent0deb306ff9ee78a6e826e9bfc354acdd439999ee
[Cocoa] Check message IDs when decoding Mach messages in IPC::Connection
https://bugs.webkit.org/show_bug.cgi?id=192300
rdar://problem/46215523

Reviewed by Chris Dumez.

* Platform/IPC/mac/ConnectionMac.mm:
(IPC::Connection::sendOutgoingMessage): Use message IDs other than 0 and 1 for
the messages, as suggested by an expert at Apple.
(IPC::createMessageDecoder): Update for the new message IDs.
(IPC::Connection::receiveSourceEventHandler): Ignore messages with unexpected
message IDs.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238800 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/ChangeLog
Source/WebKit/Platform/IPC/mac/ConnectionMac.mm