components/python/python27/patches/17-recvfrom_into.patch
branchs11u2-sru
changeset 3379 e99da14b537a
parent 3375 3724eda7445e
child 3380 ab1cb904871a
--- a/components/python/python27/patches/17-recvfrom_into.patch	Wed Oct 08 05:29:12 2014 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-# Fix from upstream: http://bugs.python.org/issue20246
-
---- Python-2.6.8/Modules/socketmodule.c	2012-04-09 16:07:34.000000000 -0700
-+++ Python-2.6.8/Modules/socketmodule.c	2014-02-12 15:27:10.106066138 -0800
-@@ -2677,6 +2677,13 @@
-         recvlen = buflen;
-     }
- 
-+    /* Check if the buffer is large enough */
-+    if (buflen < recvlen) {
-+        PyErr_SetString(PyExc_ValueError,
-+                        "buffer too small for requested bytes");
-+        goto error;
-+    }
-+
-     readlen = sock_recvfrom_guts(s, buf.buf, recvlen, flags, &addr);
-     if (readlen < 0) {
-         /* Return an error */