From f34b717a6c468d02e8e4741fa96be52f49aa0b12 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Mon, 18 Dec 2023 13:34:05 +0000 Subject: Fix small UB when no selection in s6-log Signed-off-by: Laurent Bercot --- src/daemontools-extras/s6-log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/daemontools-extras/s6-log.c b/src/daemontools-extras/s6-log.c index 18a50be..a8ad950 100644 --- a/src/daemontools-extras/s6-log.c +++ b/src/daemontools-extras/s6-log.c @@ -1232,7 +1232,7 @@ int main (int argc, char const *const *argv) mask = ~mask & 0666 ; script_firstpass(argv, &sellen, &actlen, &scriptlen, &gflags) ; { - sel_t selections[sellen] ; + sel_t selections[sellen ? sellen : 1] ; act_t actions[actlen] ; scriptelem_t script[scriptlen] ; logdir_t logdirblob[llen] ; -- cgit v1.2.3