[Python-bugs-list] [ python-Bugs-416573 ] makesockaddr() AF_UNIX ignores sun_len
noreply@sourceforge.net
noreply@sourceforge.net
Mon, 16 Apr 2001 18:18:44 -0700
Bugs item #416573, was updated on 2001-04-16 18:18
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=416573&group_id=5470
Category: Python Interpreter Core
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: makesockaddr() AF_UNIX ignores sun_len
Initial Comment:
On FreeBSD 4.2-RELEASE, bind two AF_UNIX,SOCK_DGRAM
sockets and send a packet over. The recvfrom() call
returns a corrupted pathname.
This seems to fix the problem:
return PyString_FromStringAndSize (a->sun_path,
a->sun_len - (sizeof a->sun_len + sizeof
a->sun_family));
Another fix would be to zero out the address buffer in
recvfrom() [and any other places that call
makesockaddr]
-Sam
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=416573&group_id=5470