Annotation of pkgsrc/lang/python27/patches/patch-Modules_socketmodule.c, revision 1.1.2.2
1.1.2.2 ! spz 1: $NetBSD$
! 2:
! 3: Fix vulnerability reported in SA56624. Patch taken from here:
! 4:
! 5: http://hg.python.org/cpython/rev/87673659d8f7
! 6:
! 7: --- Modules/socketmodule.c.orig 2013-11-10 07:36:41.000000000 +0000
! 8: +++ Modules/socketmodule.c 2014-02-09 08:41:25.000000000 +0000
! 9: @@ -2742,6 +2742,10 @@
! 10: if (recvlen == 0) {
! 11: /* If nbytes was not specified, use the buffer's length */
! 12: recvlen = buflen;
! 13: + } else if (recvlen > buflen) {
! 14: + PyErr_SetString(PyExc_ValueError,
! 15: + "nbytes is greater than the length of the buffer");
! 16: + goto error;
! 17: }
! 18:
! 19: readlen = sock_recvfrom_guts(s, buf.buf, recvlen, flags, &addr);
CVSweb <webmaster@jp.NetBSD.org>