components/python/python26/patches/Python26-33-recvfrom_into.patch
changeset 4984 7145b15b7f0d
parent 4983 db2589571faa
child 4985 eed3576cafd0
--- a/components/python/python26/patches/Python26-33-recvfrom_into.patch	Tue Oct 20 05:38:14 2015 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-# Fix adapted from upstream: http://bugs.python.org/issue20246
-
---- Python-2.6.8/Modules/socketmodule.c	2014-02-12 15:21:37.045342837 -0800
-+++ Python-2.6.8/Modules/socketmodule.c	2014-02-12 15:23:04.666145417 -0800
-@@ -2635,6 +2635,13 @@
-         recvlen = buflen;
-     }
- 
-+    /* Check if the buffer is large enough */
-+    if (buflen < recvlen) {
-+        PyErr_SetString(PyExc_ValueError,
-+                        "buffer too small for requested bytes");
-+        return NULL;
-+    }
-+
-     readlen = sock_recvfrom_guts(s, buf, recvlen, flags, &addr);
-     if (readlen < 0) {
-         /* Return an error */