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

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

Merge "msm: smd_pkt: Validate the size of SMD packet on read"

parents 01401712 413db77d
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -494,7 +494,13 @@ wait_for_packet:
		goto wait_for_packet;
	}

	if (pkt_size > count) {
	if (pkt_size < 0) {
		pr_err("%s: Error %d obtaining packet size for Channel %s",
				__func__, pkt_size, smd_pkt_devp->ch_name);
		return pkt_size;
	}

	if ((uint32_t)pkt_size > count) {
		pr_err("%s: failure on smd_pkt_dev id: %d - packet size %d"
		       " > buffer size %d,", __func__, smd_pkt_devp->i,
			pkt_size, count);