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

Commit a4be6e66 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "qseecom: check invalid handle for app loaded query request"

parents d68ecdc1 86b50f45
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -7750,6 +7750,13 @@ static long qseecom_ioctl(struct file *file,
		break;
	}
	case QSEECOM_IOCTL_APP_LOADED_QUERY_REQ: {
		if ((data->type != QSEECOM_GENERIC) &&
			(data->type != QSEECOM_CLIENT_APP)) {
			pr_err("app loaded query req: invalid handle (%d)\n",
								data->type);
			ret = -EINVAL;
			break;
		}
		data->type = QSEECOM_CLIENT_APP;
		mutex_lock(&app_access_lock);
		atomic_inc(&data->ioctl_count);