Commit 35cbb1e7 authored by David S. Miller's avatar David S. Miller

OpenPROM: Sigh, put the length overflow check back it is needed.

parent d837cda3
......@@ -334,6 +334,9 @@ static int copyin_string(char *user, size_t len, char **ptr)
{
char *tmp;
if ((ssize_t)len < 0 || (ssize_t)(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