Commit 241d1557 authored by Randy Dunlap's avatar Randy Dunlap Committed by Jeff Garzik

[PATCH] unchecked return code of copy_to_user in read_profile

From Daniele Bellucci <bellucda@tiscali.it>.

Check the copy_to_user() return code in read_profile().
parent b03ac92e
......@@ -536,7 +536,8 @@ static ssize_t read_profile(struct file *file, char *buf,
buf++; p++; count--; read++;
}
pnt = (char *)prof_buffer + p - sizeof(unsigned int);
copy_to_user(buf,(void *)pnt,count);
if (copy_to_user(buf,(void *)pnt,count))
return -EFAULT;
read += count;
*ppos += read;
return read;
......
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