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

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

Merge "msm: kgsl: Fix integer overflow in _load_gpmu_firmware"

parents ca652b3d fde778c1
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -715,6 +715,10 @@ static int _load_gpmu_firmware(struct adreno_device *adreno_dev)
	if (ret)
		goto err;

	/* Integer overflow check for cmd_size */
	if (data[2] > (data[0] - 2))
		goto err;

	cmds = data + data[2] + 3;
	cmd_size = data[0] - data[2] - 2;