diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2016-07-12 15:55:19 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2016-07-12 15:55:19 +0000 |
commit | 04ce2440d5cab09bbec99fc1e693b8c43193cfe6 (patch) | |
tree | 39b37d36a8f8abf2ce7d05c1d77f17c3de253c61 | |
parent | 62003152d624eb3b64ceb6fdfa3722d128020ba4 (diff) | |
download | s6-04ce2440d5cab09bbec99fc1e693b8c43193cfe6.tar.xz |
- doc typo fix
- bugfix: proper error reporting in s6_fdholder_list_cb
-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 ; |