Fix trailing garbage when pasting from clipboard.
A previous CL used GlobalSize as the explicit size of clipboard data, removing trailing nulls. This was a fix to open-ended copying logic that would occasionally read past the end of the buffer for clipboard entries not containing terminating nulls. It turns out that some clipboard entries contain much less data than the entire buffer, and don't pad out to the end with terminating nulls (only seen on Win7 when copying from command line or other console apps). The fix is to copy until first null or end of the buffer. BUG=821609 Change-Id: Id0e733ccf10b0f7d2f7ec401a584d7f14d4fd063 Reviewed-on: https://chromium-review.googlesource.com/964722Reviewed-by:Daniel Cheng <dcheng@chromium.org> Commit-Queue: Chris Hamilton <chrisha@chromium.org> Cr-Commit-Position: refs/heads/master@{#543487}
Showing
Please register or sign in to comment