Fix randomized track ID generation in CanvasCaptureHandler. Presently it can end up being truncated if a zero byte is generated in the random output, yielding less entropy than intended (1/256 of outputs are the empty string, for instance). We can also use a stack buffer for holding the random data, since it's of a small fixed size, and skip a UTF-8 decoding pass since Blink knows how to make an 8-bit string directly in such cases (Base64 output is always pure ASCII). Change-Id: I215f3ac4430a9e32f2a897e905128c8337aaa27d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1655377 Reviewed-by: Guido Urdaneta <guidou@chromium.org> Commit-Queue: Jeremy Roman <jbroman@chromium.org> Cr-Commit-Position: refs/heads/master@{#668805}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .