Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f476677b authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "check_ms_os_desc: fix buffer overflow." am: f7fed04a

Original change: https://android-review.googlesource.com/c/platform/system/core/+/1322275

Change-Id: I5bb717db05585f9c119b1b60f4a4f013da9e87a6
parents 3fc21d48 f7fed04a
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -131,8 +131,6 @@ static void check_ms_os_desc_v1(libusb_device_handle* device_handle, const std::
        errx(1, "failed to retrieve MS OS v1 compat descriptor: %s", libusb_error_name(rc));
    }

    memcpy(&hdr, data.data(), data.size());

    struct __attribute__((packed)) ms_os_desc_v1_function {
        uint8_t bFirstInterfaceNumber;
        uint8_t reserved1;