Mojo EDK: Fix MojoExtendSerializedMessagePayload
There are two problems with this API: 1. The buffer size returned is incorrect and could trivially lead to callers overflowing the message buffer. 2. It does not correctly copy the entire contents of the old message buffer upon reallocation, instead only copying the extent of the buffer reported as payload so far. This fixes both problems. Note that this API has not yet been used in production, so there are no actual bugs caused by either of these issues yet. BUG=742369 R=jcivelli@chromium.org Change-Id: I7ee7cd0783d641940e0ccafc0c9dc772eeaf2793 Reviewed-on: https://chromium-review.googlesource.com/580252Reviewed-by:Jay Civelli <jcivelli@chromium.org> Commit-Queue: Ken Rockot <rockot@chromium.org> Cr-Commit-Position: refs/heads/master@{#488769}
Showing
Please register or sign in to comment