diff Modules/socketmodule.c @ 61084:486fe82bafb8 2.6

Merged revisions 80610 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r80610 | antoine.pitrou | 2010-04-29 12:05:40 +0200 (jeu., 29 avril 2010) | 4 lines Issue #7834: Fix connect() of Bluetooth L2CAP sockets with recent versions of the Linux kernel. Patch by Yaniv Aknin. ........
author Antoine Pitrou <solipsis@pitrou.net>
date Thu, 29 Apr 2010 10:07:38 +0000
parents 7813c40942e9
children e38335d4df91
line wrap: on
line diff
--- a/Modules/socketmodule.c	Wed Apr 28 22:34:57 2010 +0000
+++ b/Modules/socketmodule.c	Thu Apr 29 10:07:38 2010 +0000
@@ -1314,6 +1314,7 @@
 			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))) {