blob: eb1c9d26b3d54a4dacf04e6c180da49d4fed6089 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
--- linux/mm/mremap.c.orig 2004-01-05 17:01:21.382104120 +0000
+++ linux/mm/mremap.c 2004-01-05 17:15:25.689749848 +0000
@@ -270,6 +270,10 @@
old_len = PAGE_ALIGN(old_len);
new_len = PAGE_ALIGN(new_len);
+ /* Don't allow the degenerate cases */
+ if (!(old_len | new_len))
+ goto out;
+
/* new_addr is only valid if MREMAP_FIXED is specified */
if (flags & MREMAP_FIXED) {
if (new_addr & ~PAGE_MASK)
|