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

Commit 431a309c 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 672d26f1 c8f76d16
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -665,6 +665,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;