commit | 5746c5368f6cf267fab479d746457340df8b8876 | [log] [tgz] |
---|---|---|
author | David Benjamin <[email protected]> | Wed Oct 25 15:16:10 2023 |
committer | Chromium LUCI CQ <[email protected]> | Wed Oct 25 15:16:10 2023 |
tree | 90e7fd598f1f25fa4b81252c7f82d2252bbc6071 | |
parent | 4482a00962ece45c8f2c0d307aac6055f9cda138 [diff] |
Avoid UB in PickleIterator::ReadBool Not all bit patterns are valid bools. Instead, ReadBool should read into a uint8_t first and then inspect the result. Additionally, always use the memcpy path, rather than the pointer casting path. The pointer cast is a strict aliasing violation (not that we enable that) and requires we reason about alignment. I think alignment may actually be okay here, but since every compiler understands memcpy, just do the straightforward and safe thing. Bug: 1394755 Change-Id: I0d6b022f6018e0c0d8b24271dfb567771faf8d00 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4973481 Reviewed-by: danakj <[email protected]> Commit-Queue: danakj <[email protected]> Auto-Submit: David Benjamin <[email protected]> Cr-Commit-Position: refs/heads/main@{#1214859}
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.
To check out the source code locally, don't use git clone
! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.
If you found a bug, please file it at https://crbug.com/new.