summaryrefslogtreecommitdiffhomepage
path: root/libs/nixio/src
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2011-07-17 09:04:43 +0000
committerJo-Philipp Wich <jow@openwrt.org>2011-07-17 09:04:43 +0000
commit518dc0fef9961bf135b1780062b346cd66192c85 (patch)
tree09fa33b57fb5fb7a97c6de30abcdea468de9d2c7 /libs/nixio/src
parent9fdb4acec0617a31ad54c0393d4002fb77536cdc (diff)
libs/nixio: Fix recvfrom() return values for unnamed unix sockets, patch by capnbry@gmail.com (#274)
Diffstat (limited to 'libs/nixio/src')
-rw-r--r--libs/nixio/src/io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/nixio/src/io.c b/libs/nixio/src/io.c
index 84bc84f6da..1d8f4484c6 100644
--- a/libs/nixio/src/io.c
+++ b/libs/nixio/src/io.c
@@ -179,7 +179,7 @@ static int nixio_sock__recvfrom(lua_State *L, int from) {
}
}
#ifndef __WINNT__
- else if (sock->domain == AF_UNIX) {
+ else if (sock->domain == AF_UNIX && alen > sizeof(sa_family_t)) {
lua_pushstring(L, addr_un.sun_path);
return 2;
}