diff options
Diffstat (limited to 'lang/python25/patches/patch-at')
-rw-r--r-- | lang/python25/patches/patch-at | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/lang/python25/patches/patch-at b/lang/python25/patches/patch-at index 0a09ce43a34..a4c44c1068a 100644 --- a/lang/python25/patches/patch-at +++ b/lang/python25/patches/patch-at @@ -1,25 +1,13 @@ -$NetBSD: patch-at,v 1.2 2008/08/30 10:02:33 tron Exp $ +$NetBSD: patch-at,v 1.3 2009/04/11 19:42:23 snj Exp $ -The first change is part of the fix for CVE-2008-2315 taken from Gentto. - ---- Modules/mmapmodule.c.orig 2006-08-22 14:57:07.000000000 +0100 -+++ Modules/mmapmodule.c 2008-08-30 10:16:13.000000000 +0100 -@@ -223,7 +223,7 @@ - return(NULL); - - /* silently 'adjust' out-of-range requests */ -- if ((self->pos + num_bytes) > self->size) { -+ if (num_bytes > self->size - self->pos) { - num_bytes -= (self->pos+num_bytes) - self->size; - } - result = Py_BuildValue("s#", self->data+self->pos, num_bytes); -@@ -449,6 +449,9 @@ +--- Modules/mmapmodule.c.orig 2009-03-20 15:07:16.000000000 -0700 ++++ Modules/mmapmodule.c 2009-03-20 15:07:34.000000000 -0700 +@@ -449,6 +449,8 @@ mmap_resize_method(mmap_object *self, #ifdef MREMAP_MAYMOVE newmap = mremap(self->data, self->size, new_size, MREMAP_MAYMOVE); +#elif defined(__NetBSD__) -+ newmap = mremap(self->data, self->size, self->data, new_size, 0); -+ ++ newmap = mremap(self->data, self->size, self->data, new_size, 0); #else newmap = mremap(self->data, self->size, new_size, 0); #endif |