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

Commit 41e5131a authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "bus: mhi: fix potential out-of-bound access"

parents f8fe0e3a 1cebc8ce
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -358,7 +358,7 @@ static struct mhi_sat_device *find_sat_dev_by_id(
static bool mhi_sat_isvalid_header(struct sat_header *hdr, int len)
{
	/* validate payload size */
	if (len >= sizeof(*hdr) && (len != hdr->payload_size + sizeof(*hdr)))
	if (len < sizeof(*hdr) || len != hdr->payload_size + sizeof(*hdr))
		return false;

	/* validate SAT IPC version */