From 04ce2440d5cab09bbec99fc1e693b8c43193cfe6 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Tue, 12 Jul 2016 15:55:19 +0000 Subject: - doc typo fix - bugfix: proper error reporting in s6_fdholder_list_cb --- src/libs6/s6_fdholder_list_cb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') 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 ; -- cgit v1.2.3