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

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

Merge "diag: dci: Check for valid peripheral before writing over to it"

parents f787dd63 389fe017
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2871,7 +2871,7 @@ int diag_dci_write_proc(int peripheral, int pkt_type, char *buf, int len)
	struct diag_smd_info *smd_info = NULL;
	int err = 0;

	if (!buf || (peripheral < 0 || peripheral > NUM_SMD_DCI_CHANNELS)
	if (!buf || (peripheral < 0 || peripheral >= NUM_SMD_DCI_CHANNELS)
		|| !driver->rcvd_feature_mask[peripheral] || len < 0) {
		pr_err("diag: In %s, invalid data 0x%p, peripheral: %d, len: %d\n",
				__func__, buf, peripheral, len);