[Cast channel Fix MessageFramer body size check.
The cast protocol allows a max message size of 64kb = 65536 bytes. However Chrome does not enforce this correctly in the following ways: - 65535 is used instead of 65536 as the max limit - The limit should not include the 4 byte header, but Chrome includes it (e.g., the IOBuffer used to read both only has 65535 bytes of capacity) This patch fixes this by allocating 65536 + 4 bytes for the input buffer, and modifying the check for message size against 65536. Bug: 822611 Change-Id: I27121abb57dee5aee9741173e19cf0178184477d Reviewed-on: https://chromium-review.googlesource.com/996475 Commit-Queue: Derek Cheng <imcheng@chromium.org> Reviewed-by:Adam Parker <amp@chromium.org> Cr-Commit-Position: refs/heads/master@{#548860}
Showing
Please register or sign in to comment