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

Commit f7c3ccb5 authored by Iliya Varadzhakov's avatar Iliya Varadzhakov
Browse files

msm: camera: Check IOCTL input data for NULL pointer



The argument of the IOCTL function is checked for NULL, but
the pointer that is used to get the data is not checked. This may
cause NULL pointer dereferencing.

Change-Id: I2c732cf9f0d26095685f2119fb60ddb74298ffb9
Signed-off-by: default avatarIliya Varadzhakov <ivarad@codeaurora.org>
Signed-off-by: default avatarHody Hung <hhung@codeaurora.org>
parent 4e31a3a1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1579,7 +1579,7 @@ long msm_cpp_subdev_ioctl(struct v4l2_subdev *sd,
	struct msm_camera_v4l2_ioctl_t *ioctl_ptr = arg;
	int rc = 0;

	if (ioctl_ptr == NULL) {
	if ((ioctl_ptr == NULL) || (ioctl_ptr->ioctl_ptr == NULL)) {
		pr_err("ioctl_ptr is null\n");
		return -EINVAL;
	}