summaryrefslogtreecommitdiff
path: root/src/libs6/s6_fdholder_getdump.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs6/s6_fdholder_getdump.c')
-rw-r--r--src/libs6/s6_fdholder_getdump.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libs6/s6_fdholder_getdump.c b/src/libs6/s6_fdholder_getdump.c
index 3fce3a7..f464546 100644
--- a/src/libs6/s6_fdholder_getdump.c
+++ b/src/libs6/s6_fdholder_getdump.c
@@ -2,6 +2,7 @@
#include <errno.h>
#include <skalibs/uint32.h>
+#include <skalibs/allreadwrite.h>
#include <skalibs/error.h>
#include <skalibs/bytestr.h>
#include <skalibs/tai.h>
@@ -19,7 +20,7 @@ int s6_fdholder_getdump (s6_fdholder_t *a, genalloc *g, tain_t const *deadline,
int ok ;
if (!unixmessage_put(&a->connection.out, &m)) return 0 ;
if (!unixmessage_sender_timed_flush(&a->connection.out, deadline, stamp)) return 0 ;
- if (!unixmessage_timed_receive(&a->connection.in, &m, deadline, stamp)) return 0 ;
+ if (sanitize_read(unixmessage_timed_receive(&a->connection.in, &m, deadline, stamp)) < 0) return 0 ;
if (!m.len || m.nfds) return (errno = EPROTO, 0) ;
if (m.s[0]) return (errno = m.s[0], 0) ;
if (m.len != 9) return (errno = EPROTO, 0) ;
@@ -31,7 +32,7 @@ int s6_fdholder_getdump (s6_fdholder_t *a, genalloc *g, tain_t const *deadline,
for (; i < n ; i++)
{
- if (!unixmessage_timed_receive(&a->connection.in, &m, deadline, stamp)) goto err ;
+ if (sanitize_read(unixmessage_timed_receive(&a->connection.in, &m, deadline, stamp)) < 0) goto err ;
if (genalloc_len(s6_fdholder_fd_t, g) + m.nfds > ntot) goto droperr ;
if (ok)
{