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

Commit 8d95b015 authored by Dinesh K Garg's avatar Dinesh K Garg Committed by Gerrit - the friendly Code Review server
Browse files

qmp_core: Return error for invalid input



Return error when input value is invalid.

Change-Id: I17ff43dc09e5f693fc2712dc7a2f602ed710ec7b
Acked-by: default avatarBaranidharan Muthukumaran <bmuthuku@qti.qualcomm.com>
Signed-off-by: default avatarDinesh K Garg <dineshg@codeaurora.org>
parent 3c59f85d
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -498,7 +498,8 @@ static long qmp_sphinx_logk_set_mapping(unsigned long arg)
					(__u32 __user *)arg, sizeof(__u32)))
		return -EFAULT;

	if (0 == num_elements)
	if ((0 == num_elements) || (num_elements >
		(UINT_MAX / sizeof(struct qmp_sphinx_source_mask))))
		return -EFAULT;

	if (NULL != pmask) {