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

Commit 446e7c9d authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "input: touchscreen: fix buffer overflow issue in synaptics driver"

parents 6f43606b ac276656
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -2218,10 +2218,12 @@ static int fwu_get_image_firmware_id(unsigned int *fw_id)
					__func__);
			return -ENOMEM;
		}
		while (strptr[index] >= '0' && strptr[index] <= '9') {
		while ((index < MAX_FIRMWARE_ID_LEN - 1) && strptr[index] >= '0'
						&& strptr[index] <= '9') {
			firmware_id[index] = strptr[index];
			index++;
		}
		firmware_id[index] = '\0';

		retval = sstrtoul(firmware_id, 10, (unsigned long *)fw_id);
		kfree(firmware_id);