Annotation of pkgsrc/lang/python33/patches/patch-Modules_socketmodule.c, revision 1.2.2.2

1.2.2.2 ! tron        1: $NetBSD$
        !             2: 
        !             3: * Fix vulnerability reported in SA56624, taken from upstream:
        !             4:   http://hg.python.org/cpython/rev/7f176a45211f/
        !             5: 
        !             6: --- Modules/socketmodule.c.orig        2013-11-17 07:23:02.000000000 +0000
        !             7: +++ Modules/socketmodule.c
        !             8: @@ -2935,6 +2935,11 @@ sock_recvfrom_into(PySocketSockObject *s
        !             9:      if (recvlen == 0) {
        !            10:          /* If nbytes was not specified, use the buffer's length */
        !            11:          recvlen = buflen;
        !            12: +    } else if (recvlen > buflen) {
        !            13: +        PyBuffer_Release(&pbuf);
        !            14: +        PyErr_SetString(PyExc_ValueError,
        !            15: +                        "nbytes is greater than the length of the buffer");
        !            16: +        return NULL;
        !            17:      }
        !            18:  
        !            19:      readlen = sock_recvfrom_guts(s, buf, recvlen, flags, &addr);

CVSweb <webmaster@jp.NetBSD.org>