summaryrefslogtreecommitdiffstats
path: root/lang/python26/files/patch-modules_mmapmodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'lang/python26/files/patch-modules_mmapmodule.c')
-rw-r--r--lang/python26/files/patch-modules_mmapmodule.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/lang/python26/files/patch-modules_mmapmodule.c b/lang/python26/files/patch-modules_mmapmodule.c
new file mode 100644
index 0000000..60f3d71
--- /dev/null
+++ b/lang/python26/files/patch-modules_mmapmodule.c
@@ -0,0 +1,11 @@
+--- 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);
OpenPOWER on IntegriCloud