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

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

Merge "msm: ais: cpp fix to check zero length ioctl"

parents 7f01412b 3e657b1e
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -2889,6 +2889,8 @@ static int msm_cpp_validate_input(unsigned int cmd, void *arg,
	case MSM_SD_SHUTDOWN:
	case MSM_SD_NOTIFY_FREEZE:
	case MSM_SD_UNNOTIFY_FREEZE:
	case VIDIOC_MSM_CPP_IOMMU_ATTACH:
	case VIDIOC_MSM_CPP_IOMMU_DETACH:
		break;
	default: {
		if (ioctl_ptr == NULL) {
@@ -2897,8 +2899,9 @@ static int msm_cpp_validate_input(unsigned int cmd, void *arg,
		}

		*ioctl_ptr = arg;
		if ((*ioctl_ptr == NULL) ||
			(*ioctl_ptr)->ioctl_ptr == NULL) {
		if (((*ioctl_ptr) == NULL) ||
			((*ioctl_ptr)->ioctl_ptr == NULL) ||
			((*ioctl_ptr)->len == 0)) {
			pr_err("Error invalid ioctl argument cmd %u", cmd);
			return -EINVAL;
		}