s6

Mirror/fork of https://skarnet.org/software/s6/
git clone https://ccx.te2000.cz/git/s6
Log | Files | Refs | README | LICENSE

commit 04ce2440d5cab09bbec99fc1e693b8c43193cfe6
parent 62003152d624eb3b64ceb6fdfa3722d128020ba4
Author: Laurent Bercot <ska-skaware@skarnet.org>
Date:   Tue, 12 Jul 2016 15:55:19 +0000

 - doc typo fix
 - bugfix: proper error reporting in s6_fdholder_list_cb

Diffstat:
Mdoc/upgrade.html | 2+-
Msrc/libs6/s6_fdholder_list_cb.c | 3++-
2 files changed, 3 insertions(+), 2 deletions(-)

diff --git 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 @@ -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 ;