projects
/
deliverable
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
mm/nommu.c: add additional check for vread() just like vwrite() has done
[deliverable/linux.git]
/
mm
/
nommu.c
diff --git
a/mm/nommu.c
b/mm/nommu.c
index 298884dcd6e71e4723a203a82f1613cbfcec19ec..1898b2fe9da5eefdc3b33823a3cd23d2a401118f 100644
(file)
--- a/
mm/nommu.c
+++ b/
mm/nommu.c
@@
-282,6
+282,10
@@
EXPORT_SYMBOL(vmalloc_to_pfn);
long vread(char *buf, char *addr, unsigned long count)
{
+ /* Don't allow overflow */
+ if ((unsigned long) buf + count < count)
+ count = -(unsigned long) buf;
+
memcpy(buf, addr, count);
return count;
}
This page took
0.025069 seconds
and
5
git commands to generate.