Replace memcopy with memmove for overlapping copies
copyFromChannel can produce overlapping areas when the source array is the same as the channel data array. Use memmove instead of memcpy to handle this case. copyToChannel has the same issue, so fix that too. Manually tested the repro case with a local asan build. The issue no longer reproduces. Bug: 1081722 Change-Id: I168ef418fccf45646bb4d8a01c22cecfbd5da20b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2202394Reviewed-by:Hongchan Choi <hongchan@chromium.org> Commit-Queue: Raymond Toy <rtoy@chromium.org> Cr-Commit-Position: refs/heads/master@{#769034}
Showing
Please register or sign in to comment