Use base::RandBytes() to generate greased HTTP/2 frame flag byte.
The primary motivation is that the previous incantation looked suspicions: even though the rules of C++ are very clear about type casting when adding 255 as a uint8 and 1 as an int and then using it as an argument for a function that takes a uint64, it is too much to think about. This CL uses RandBytes() instead of read a single byte. (Incidentally RandGenerator() implementation is a bit complicated, and always reads 64 random bytes, quite unnecessarily in this case.) Bug: 1020233 Change-Id: I3e5610779c1643f86f2d615915931903d4962448 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1906466 Commit-Queue: Ryan Hamilton <rch@chromium.org> Reviewed-by:Ryan Hamilton <rch@chromium.org> Cr-Commit-Position: refs/heads/master@{#713932}
Showing
Please register or sign in to comment