18239867 problem in UTILITY/PYTHON s11u1-sru 0.175.1.17.0.4.0 S11.1SRU17.4
authorJohn Beck <John.Beck@Oracle.COM>
Mon, 24 Feb 2014 06:47:39 -0800
branchs11u1-sru
changeset 2963 48e96df31087
parent 2958 d9b5e8394801
child 2970 01b1a705eae1
18239867 problem in UTILITY/PYTHON
components/python/python26/patches/Python26-29-recvfrom_into.patch
components/python/python27/patches/17-recvfrom_into.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/python/python26/patches/Python26-29-recvfrom_into.patch	Mon Feb 24 06:47:39 2014 -0800
@@ -0,0 +1,18 @@
+# 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
[email protected]@ -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 */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/python/python27/patches/17-recvfrom_into.patch	Mon Feb 24 06:47:39 2014 -0800
@@ -0,0 +1,18 @@
+# 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
[email protected]@ -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 */