summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libs6/s6_fdholder_list_cb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libs6/s6_fdholder_list_cb.c b/src/libs6/s6_fdholder_list_cb.c
index d465004..59d01a5 100644
--- a/src/libs6/s6_fdholder_list_cb.c
+++ b/src/libs6/s6_fdholder_list_cb.c
@@ -13,12 +13,13 @@ int s6_fdholder_list_cb (unixmessage_t const *m, void *p)
uint32 n ;
register s6_fdholder_list_result_t *res = p ;
if (m->nfds) goto droperr ;
- if (m->len < 5) goto err ;
+ if (!m->len) goto err ;
if (m->s[0])
{
res->err = m->s[0] ;
return 1 ;
}
+ if (m->len < 5) goto err ;
uint32_unpack_big(m->s + 1, &n) ;
if (byte_count(m->s + 5, m->len - 5, 0) != n) goto err ;
if (!stralloc_catb(res->sa, m->s + 5, m->len - 5)) return 0 ;