commit | 02bae25a94d36649b49f8165cf6502b09503ae06 | [log] [tgz] |
---|---|---|
author | Maksim Ivanov <emaxx@chromium.org> | Mon Sep 27 01:40:23 2021 |
committer | Chromium LUCI CQ <chromium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Mon Sep 27 01:40:23 2021 |
tree | bd4700560a34d13296ddcff7354c82ff28a989a4 | |
parent | 5593b4165451100b0047f839f1bef270c4785d34 [diff] |
Fix use-after-move in //c/b/ash/usb/ Fix a potential issue in cros_usb_detector.cc with the same object being used for reading and for std::move()'ing from within the same expression. This is only a potential issue, since currently it's only happening with an uint32_t field, which stays intact in the moved-from object; still, it's a potential bug if this gets changed or other fields become read from. This issue was found by the bugprone-use-after-move clang-tidy diagnostics: cros_usb_detector.cc:597: 'new_device' used after it was moved cros_usb_detector.cc:583: move occurred here Bug: 1122844 Change-Id: Ifcfbccaedc9d1a2d58da3069c750a27b03359858 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3184759 Auto-Submit: Maksim Ivanov <emaxx@chromium.org> Reviewed-by: Nicholas Verne <nverne@chromium.org> Commit-Queue: Maksim Ivanov <emaxx@chromium.org> Cr-Commit-Position: refs/heads/main@{#925116}
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.