components/python/python26/patches/Python26-36-buffer-overflow.patch
changeset 2113 38667c45630e
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/python/python26/patches/Python26-36-buffer-overflow.patch	Wed Sep 24 06:44:55 2014 -0700
@@ -0,0 +1,13 @@
+This patch comes from upstream: http://bugs.python.org/issue21831
+
+--- a/Objects/bufferobject.c
++++ b/Objects/bufferobject.c
+@@ -88,7 +88,7 @@ get_buf(PyBufferObject *self, void **ptr
+             *size = count;
+         else
+             *size = self->b_size;
+-        if (offset + *size > count)
++        if (*size > count - offset)
+             *size = count - offset;
+     }
+     return 1;