summaryrefslogtreecommitdiff
path: root/src/libunixonacid
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2015-03-13 15:54:43 +0000
committerLaurent Bercot <ska-skaware@skarnet.org>2015-03-13 15:54:43 +0000
commit3f62636a98777125444f5bceff812428f6a73039 (patch)
tree923a0f0bcc9607ac8cde3fa9bb3125c6c2449a83 /src/libunixonacid
parent81fbf8c30b4a6fd3a91ba2d986f35541015ae1e6 (diff)
downloadskalibs-3f62636a98777125444f5bceff812428f6a73039.tar.xz
Applied Roman Kimov's fixesv2.3.1.3
Diffstat (limited to 'src/libunixonacid')
-rw-r--r--src/libunixonacid/unixmessage_receive.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libunixonacid/unixmessage_receive.c b/src/libunixonacid/unixmessage_receive.c
index 5fa16c4..885a7bc 100644
--- a/src/libunixonacid/unixmessage_receive.c
+++ b/src/libunixonacid/unixmessage_receive.c
@@ -49,7 +49,6 @@ static int unixmessage_receiver_fill (unixmessage_receiver_t *b)
.msg_control = b->fds_ok & 1 ? ancilbuf : 0,
.msg_controllen = b->fds_ok & 1 ? sizeof(ancilbuf) : 0
} ;
- unsigned int auxlen ;
int r = -1 ;
if (cbuffer_isfull(&b->mainb) || ((b->fds_ok & 1) && cbuffer_isfull(&b->auxb)))
return (errno = ENOBUFS, -1) ;
@@ -68,6 +67,7 @@ static int unixmessage_receiver_fill (unixmessage_receiver_t *b)
struct cmsghdr *c = CMSG_FIRSTHDR(&msghdr) ;
if (c)
{
+ unsigned int auxlen ;
if (c->cmsg_level != SOL_SOCKET
|| c->cmsg_type != SCM_RIGHTS) return (errno = EPROTO, -1) ;
auxlen = (unsigned int)(c->cmsg_len - (CMSG_DATA(c) - (unsigned char *)c)) ;