Commit 9ba73e24 authored by David S. Miller's avatar David S. Miller

drivers/sbus/char/openprom.c: Verify user len in copyin_string.

parent 5d15a9af
......@@ -334,6 +334,9 @@ static int copyin_string(char *user, size_t len, char **ptr)
{
char *tmp;
if (len < 0 || len + 1 < 0)
return -EINVAL;
tmp = kmalloc(len + 1, GFP_KERNEL);
if (!tmp)
return -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment