]> git.pld-linux.org Git - packages/kernel.git/blob - linux-do_brk-bound-check.patch
- new (for kernel older thatn 2.4.23)
[packages/kernel.git] / linux-do_brk-bound-check.patch
1 diff -urN linux-2.4.22/mm/mmap.c linux-2.4.23/mm/mmap.c
2 --- linux-2.4.22/mm/mmap.c      2003-06-13 07:51:39.000000000 -0700
3 +++ linux-2.4.23/mm/mmap.c      2003-11-28 10:26:21.000000000 -0800
4 @@ -1041,6 +1041,9 @@
5         if (!len)
6                 return addr;
7  
8 +       if ((addr + len) > TASK_SIZE || (addr + len) < addr)
9 +               return -EINVAL;
10 +
11         /*
12          * mlock MCL_FUTURE?
13          */
14
This page took 0.031097 seconds and 4 git commands to generate.