summaryrefslogtreecommitdiff
blob: fef1f1e981e2381fc57781162793bffa4e19057e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
--- a/mm/mmap.c Fri Sep 12 06:44:06 2003
+++ b/mm/mmap.c Thu Oct  2 01:18:19 2003
@@ -1041,6 +1041,9 @@
	if (!len)
		return addr;
 
+ 	if ((addr + len) > TASK_SIZE || (addr + len) < addr)
+ 		return -EINVAL;
+ 
	/*
	 * mlock MCL_FUTURE?
	 */