summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Manouchehri <david@davidmanouchehri.com>2020-10-08 04:51:46 +0000
committerMichael BrĂ¼ning <michael.bruning@qt.io>2021-03-02 15:09:15 +0000
commit5c74a3546e3322308025317180d25f26c4313aa0 (patch)
tree396e3105a3c1f3c32a4864d89e6ca1a8b28d2f47
parentbd0def3d818167c350c553f20ae21ac9699fd6f7 (diff)
downloadqtwebengine-chromium-5c74a3546e3322308025317180d25f26c4313aa0.tar.gz
[Backport] CVE-2021-21140: Uninitialized Use in USB [1/2]
Cherry-pick of patch originally reviewed on https://chromium-review.googlesource.com/c/chromium/src/+/2459447: Initialize urb to make MSan happy. Bug: 1136327 Change-Id: Id47e06bfd088e5c72d5f41c091882e99768fb93d Commit-Queue: Reilly Grant <reillyg@chromium.org> Auto-Submit: David Manouchehri <david@davidmanouchehri.com> Reviewed-by: Reilly Grant <reillyg@chromium.org> Cr-Commit-Position: refs/heads/master@{#815025} Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> (cherry picked from commit f195542986b3d88fa7cd92fbe89d7c0f7d1341cd)
-rw-r--r--chromium/device/usb/usb_device_handle_usbfs.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/chromium/device/usb/usb_device_handle_usbfs.cc b/chromium/device/usb/usb_device_handle_usbfs.cc
index e0d578bc0a8..e5f1f285bcd 100644
--- a/chromium/device/usb/usb_device_handle_usbfs.cc
+++ b/chromium/device/usb/usb_device_handle_usbfs.cc
@@ -328,7 +328,7 @@ void UsbDeviceHandleUsbfs::FileThreadHelper::OnFileCanWriteWithoutBlocking() {
std::vector<usbdevfs_urb*> urbs;
urbs.reserve(MAX_URBS_PER_EVENT);
for (size_t i = 0; i < MAX_URBS_PER_EVENT; ++i) {
- usbdevfs_urb* urb;
+ usbdevfs_urb* urb = nullptr;
int rc = HANDLE_EINTR(ioctl(fd_.get(), USBDEVFS_REAPURBNDELAY, &urb));
if (rc) {
if (errno == EAGAIN)