Skip to content

Commit 5c74a35

Browse files
Manouchehrimibrunin
authored andcommitted
[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 <[email protected]> Auto-Submit: David Manouchehri <[email protected]> Reviewed-by: Reilly Grant <[email protected]> Cr-Commit-Position: refs/heads/master@{#815025} Reviewed-by: Allan Sandfeld Jensen <[email protected]> (cherry picked from commit f195542)
1 parent bd0def3 commit 5c74a35

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

chromium/device/usb/usb_device_handle_usbfs.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ void UsbDeviceHandleUsbfs::FileThreadHelper::OnFileCanWriteWithoutBlocking() {
328328
std::vector<usbdevfs_urb*> urbs;
329329
urbs.reserve(MAX_URBS_PER_EVENT);
330330
for (size_t i = 0; i < MAX_URBS_PER_EVENT; ++i) {
331-
usbdevfs_urb* urb;
331+
usbdevfs_urb* urb = nullptr;
332332
int rc = HANDLE_EINTR(ioctl(fd_.get(), USBDEVFS_REAPURBNDELAY, &urb));
333333
if (rc) {
334334
if (errno == EAGAIN)

0 commit comments

Comments
 (0)