From b4f2b435bb7921c9a447b156bce4d2e671993fdd Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Fri, 14 Sep 2018 21:42:32 +0000 Subject: bugfix: UB in s6-fdholderd's do_list --- src/fdholder/s6-fdholderd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/fdholder/s6-fdholderd.c b/src/fdholder/s6-fdholderd.c index 56dfb63..b0a9d0c 100644 --- a/src/fdholder/s6-fdholderd.c +++ b/src/fdholder/s6-fdholderd.c @@ -318,7 +318,7 @@ static int fill_siovec_with_ids_iter (char *thing, void *data) static int do_list (uint32_t cc, unixmessage_t const *m) { client_t *c = CLIENT(cc) ; - struct iovec v[numfds] ; + struct iovec v[1+numfds] ; unixmessage_v_t ans = { .v = v, .vlen = 1+numfds, .fds = 0, .nfds = 0 } ; struct iovec *vp = v + 1 ; char pack[5] = "" ; -- cgit v1.2.3