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

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

Merge "QBT1000: check for null pointer before copying command"

parents 53202f0d d86e1731
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -913,6 +913,13 @@ static long qbt1000_ioctl(struct file *file, unsigned cmd, unsigned long arg)
		if (rc != 0)
			goto end;

		if (!aligned_cmd) {
			dev_err(drvdata->dev, "%s: Null command buffer\n",
				__func__);
			rc = -EINVAL;
			goto end;
		}

		rc = copy_from_user(aligned_cmd, (void __user *)tzcmd.req_buf,
				tzcmd.req_buf_len);
		if (rc != 0) {