DescriptionMojo: Fix possibly-invalid vector subscripting in RawChannelPosix.
In RawChannelPosix::OnFileCanReadWithoutBlocking()'s call to memmove(),
read_buffer_start may point one past the end of the buffer. This isn't a
"real" problem, since in that case read_buffer_num_valid_bytes_ will be
zero, but it's illegal to subscript a vector with an invalid index and
an assertion fails in Debug builds (an alternate fix would be to replace
&read_buffer_[read_buffer_start] with &read_buffer_[0] +
read_buffer_start).
The bug was exhibited by the flakily-failing
MultiprocessMessagePipeTest.QueueMessages (in Debug builds), so to test
run:
out/Debug/mojo_system_unittests \
--gtest_filter=MultiprocessMessagePipeTest.QueueMessages \
--gtest_repeat=-1 --single-process-tests
R=darin@chromium.org
BUG=329622
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=244194
Patch Set 1 #
Messages
Total messages: 3 (0 generated)
|