mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
um: Fix return value of strnlen_user()
In case of an error it must not return -EFAULT. Return 0 like all other archs do. Reported-by: toralf.foerster@gmx.de Signed-off-by: Richard Weinberger <richard@nod.at>
This commit is contained in:
parent
ecb2cf1a6b
commit
3179ce7254
@ -254,6 +254,6 @@ int strnlen_user(const void __user *str, int len)
|
|||||||
n = buffer_op((unsigned long) str, len, 0, strnlen_chunk, &count);
|
n = buffer_op((unsigned long) str, len, 0, strnlen_chunk, &count);
|
||||||
if (n == 0)
|
if (n == 0)
|
||||||
return count + 1;
|
return count + 1;
|
||||||
return -EFAULT;
|
return 0;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(strnlen_user);
|
EXPORT_SYMBOL(strnlen_user);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user