commit | f56649dd9acbacf447a5dde70a4de37190e5e6e6 | [log] [tgz] |
---|---|---|
author | David Benjamin <davidben@chromium.org> | Mon Oct 30 15:06:10 2023 |
committer | Chromium LUCI CQ <chromium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Mon Oct 30 15:06:10 2023 |
tree | d0223a47d703a58863b447652653bea0a7c12348 | |
parent | c6280944baa0bc492a345837f43fe480aab97e7c [diff] |
Fix skia_unittests under UBSan Signed integer overflow is undefined, and the calls to rand() * 255 may overflow. Since this was already nondeterministic with the srand(time()) call, just use base::RandBytes. While I'm here, replace some &vec[0] with vec.data(). &vec[0] is UB when vec is empty. vec is not empty here, but vec.data() captures the intent of these functions more straightforwardly. Bug: 1394755 Change-Id: If1ec10496ec9260930ec00f1325c905f9158a035 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4979785 Reviewed-by: Nico Weber <thakis@chromium.org> Commit-Queue: Nico Weber <thakis@chromium.org> Auto-Submit: David Benjamin <davidben@chromium.org> Cr-Commit-Position: refs/heads/main@{#1216936}
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.