Blame SOURCES/0011-wacom-usb-Fix-a-buffer-overread-spotted-by-AddressSa.patch
|
|
003958 |
From 60b5598032b3c36660984e7d49a5ff929ecd6e26 Mon Sep 17 00:00:00 2001
|
|
|
003958 |
From: Richard Hughes <richard@hughsie.com>
|
|
|
003958 |
Date: Mon, 8 Feb 2021 18:41:45 +0000
|
|
|
003958 |
Subject: [PATCH 11/11] wacom-usb: Fix a buffer-overread spotted by
|
|
|
003958 |
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 d3a41682..ae1e7cac 100644
|
|
|
003958 |
--- plugins/wacom-usb/fu-wac-firmware.c
|
|
|
003958 |
+++ plugins/wacom-usb/fu-wac-firmware.c
|
|
|
003958 |
@@ -65,7 +65,7 @@ fu_wac_firmware_parse (FuFirmware *firmware,
|
|
|
003958 |
guint cmdlen = strlen (lines[i]);
|
|
|
003958 |
|
|
|
003958 |
/* header info record */
|
|
|
003958 |
- if (memcmp (lines[i] + 2, "COM", 3) == 0) {
|
|
|
003958 |
+ if (cmdlen > 3 && memcmp (lines[i] + 2, "COM", 3) == 0) {
|
|
|
003958 |
guint8 header_image_cnt = 0;
|
|
|
003958 |
if (cmdlen != 40) {
|
|
|
003958 |
g_set_error (error,
|
|
|
003958 |
--
|
|
|
003958 |
2.29.2
|
|
|
003958 |
|