libs/nixio: Fix recvfrom() return values for unnamed unix sockets, patch by capnbry@gmail.com (#274)
This commit is contained in:
parent
9fdb4acec0
commit
518dc0fef9
1 changed files with 1 additions and 1 deletions
|
@ -179,7 +179,7 @@ static int nixio_sock__recvfrom(lua_State *L, int from) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifndef __WINNT__
|
#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);
|
lua_pushstring(L, addr_un.sun_path);
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue