]> granicus.if.org Git - python/commitdiff
Issue #7834: Fix connect() of Bluetooth L2CAP sockets with recent versions
authorAntoine Pitrou <solipsis@pitrou.net>
Thu, 29 Apr 2010 10:05:40 +0000 (10:05 +0000)
committerAntoine Pitrou <solipsis@pitrou.net>
Thu, 29 Apr 2010 10:05:40 +0000 (10:05 +0000)
of the Linux kernel.  Patch by Yaniv Aknin.

Misc/ACKS
Misc/NEWS
Modules/socketmodule.c

index 0bb62ae2fac625bd40ccf3e968ab3786e46acbeb..af6a7be02b7f0ca640ed817d38e5d4b55f634517 100644 (file)
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -14,6 +14,7 @@ David Abrahams
 Jim Ahlstrom
 Farhan Ahmad
 Nir Aides
+Yaniv Aknin
 Jyrki Alakuijala
 Billy G. Allie
 Kevin Altis
index 1f584f4f4efd38c00295729371abd3cd3f5c6d0c..470c07c387c17b0ead4f2578bb086f88c6e9e44d 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -31,6 +31,9 @@ Core and Builtins
 Library
 -------
 
+- Issue #7834: Fix connect() of Bluetooth L2CAP sockets with recent versions
+  of the Linux kernel.  Patch by Yaniv Aknin.
+
 - Issue #6312: Fixed http HEAD request when the transfer encoding is chunked.
   It should correctly return an empty response now.
 
index 901cb7d916d47b11495e12b6e0ede188176015e3..0625acb30dfe5534cb5a6dff7773ba3d84ac9920 100644 (file)
@@ -1326,6 +1326,7 @@ getsockaddrarg(PySocketSockObject *s, PyObject *args,
                        char *straddr;
 
                        addr = (struct sockaddr_l2 *)addr_ret;
+                       memset(addr, 0, sizeof(struct sockaddr_l2));
                        _BT_L2_MEMB(addr, family) = AF_BLUETOOTH;
                        if (!PyArg_ParseTuple(args, "si", &straddr,
                                              &_BT_L2_MEMB(addr, psm))) {