UNIX domain sockets bug

Michael Lausch (mla@loki.muc.de)
Wed, 9 Aug 1995 11:37:04 +0200


Found one bug in af_unix.c which cuases an Ooops.
There is still one bug there (gnuclient is not working, X11 is working).

here's the patch:

--- /usr/src/linux/net/unix/af_unix.c Tue Aug 8 23:54:24 1995
+++ /disk/compiles/linux/net/unix/af_unix.c Wed Aug 9 11:21:45 1995
@@ -937,7 +937,10 @@
iov.iov_base=ubuf;
iov.iov_len=size;
msg.msg_name=(void *)sa;
- msg.msg_namelen=get_user(addr_len);
+ if (addr_len)
+ msg.msg_namelen=get_user(addr_len);
+ else
+ msg.msg_namelen = 0;
msg.msg_accrights=NULL;
msg.msg_iov=&iov;
msg.msg_iovlen=1;

---
Magic is real unless declared integer (Wiz Zumwalt)
Michael Lausch/mla@loki.muc.de/PGP available from keyserver 
Transmission of this message via the Microsoft Network is prohibited