19672848 problem in UTILITY/PYTHON
authorJohn Beck <John.Beck@Oracle.COM>
Wed, 24 Sep 2014 06:44:55 -0700
changeset 2113 38667c45630e
parent 2112 97e2c252be4c
child 2114 5a98d3204048
19672848 problem in UTILITY/PYTHON
components/python/python26/patches/Python26-36-buffer-overflow.patch
--- /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;