summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-kernel/usermode-sources/files/do_brk_fix.patch')
-rw-r--r--sys-kernel/usermode-sources/files/do_brk_fix.patch12
1 files changed, 12 insertions, 0 deletions
diff --git a/sys-kernel/usermode-sources/files/do_brk_fix.patch b/sys-kernel/usermode-sources/files/do_brk_fix.patch
new file mode 100644
index 000000000000..fef1f1e981e2
--- /dev/null
+++ b/sys-kernel/usermode-sources/files/do_brk_fix.patch
@@ -0,0 +1,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?
+ */