Blame SOURCES/0008-wacom-usb-Fix-a-crash-detected-by-AddressSanitizer.patch
|
|
c5a379 |
From b943adc496451975a9b959d78c0859a7fea5e483 Mon Sep 17 00:00:00 2001
|
|
|
c5a379 |
From: Richard Hughes <richard@hughsie.com>
|
|
|
c5a379 |
Date: Sun, 7 Feb 2021 16:55:02 +0000
|
|
|
c5a379 |
Subject: [PATCH 08/11] wacom-usb: Fix a crash detected by AddressSanitizer
|
|
|
c5a379 |
|
|
|
c5a379 |
---
|
|
|
c5a379 |
plugins/wacom-usb/fu-wac-firmware.c | 2 +-
|
|
|
c5a379 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
c5a379 |
|
|
|
c5a379 |
diff --git plugins/wacom-usb/fu-wac-firmware.c plugins/wacom-usb/fu-wac-firmware.c
|
|
|
c5a379 |
index fc54cf10..d3a41682 100644
|
|
|
c5a379 |
--- plugins/wacom-usb/fu-wac-firmware.c
|
|
|
c5a379 |
+++ plugins/wacom-usb/fu-wac-firmware.c
|
|
|
c5a379 |
@@ -44,7 +44,7 @@ fu_wac_firmware_parse (FuFirmware *firmware,
|
|
|
c5a379 |
|
|
|
c5a379 |
/* check the prefix (BE) */
|
|
|
c5a379 |
data = (guint8 *) g_bytes_get_data (fw, &len;;
|
|
|
c5a379 |
- if (memcmp (data, "WACOM", 5) != 0) {
|
|
|
c5a379 |
+ if (len < 5 || memcmp (data, "WACOM", 5) != 0) {
|
|
|
c5a379 |
g_set_error_literal (error,
|
|
|
c5a379 |
FWUPD_ERROR,
|
|
|
c5a379 |
FWUPD_ERROR_INTERNAL,
|
|
|
c5a379 |
--
|
|
|
c5a379 |
2.29.2
|
|
|
c5a379 |
|