diff options
-rw-r--r-- | doc/upgrade.html | 2 | ||||
-rw-r--r-- | src/libs6/s6_fdholder_list_cb.c | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/doc/upgrade.html b/doc/upgrade.html index 20079d3..683bba2 100644 --- a/doc/upgrade.html +++ b/doc/upgrade.html @@ -146,7 +146,7 @@ waiting has changed. </li> of <tt>notification-fd</tt> before accepting a <tt>U</tt> command. </li> <li> New <tt>-X</tt> option to <a href="s6-svc.html">s6-svc</a>. </li> <li> Different meaning of SIGQUIT for -<a href="s6-supervise">s6-supervise</a>: now the same as +<a href="s6-supervise.html">s6-supervise</a>: now the same as <tt>s6-svc -X</tt>. </li> </ul> 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 ; |