Messages in this thread | | | Subject | Bug or dead code in net/unix/af_unix.c:unix_mkname() | From | James Antill <> | Date | Mon, 11 Oct 2004 14:07:49 -0400 |
| |
unix_mkname() looks like (in both 2.4.x and 2.6.x)...
static int unix_mkname(struct sockaddr_un * sunaddr, int len, unsigned *hashp) { if (len <= sizeof(short) || len > sizeof(*sunaddr)) return -EINVAL; [...] if (len > sizeof(*sunaddr)) len = sizeof(*sunaddr);
...so if you pass a "large" sockaddr_un struct bind() just returns -EINVAL. I assume that is intentional, but that just makes the huge comment and test later dead code.
-- James Antill - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |