Blame SOURCES/0008-wacom-usb-Fix-a-crash-detected-by-AddressSanitizer.patch

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