From e23eea9438a15fe64ab03da0f35aa310a10900bf Mon Sep 17 00:00:00 2001 From: foutaise Date: Tue, 6 Feb 2018 12:30:04 +0100 Subject: [PATCH] Add check for interval value --- i3status.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/i3status.c b/i3status.c index 2cded06..5088c96 100644 --- a/i3status.c +++ b/i3status.c @@ -631,6 +631,11 @@ int main(int argc, char *argv[]) { die("Could not create socket\n"); int interval = cfg_getint(cfg_general, "interval"); + if (interval <= 0) { + die("Invalid interval attribute found in section %s, line %d: %d\n" + "Expected positive integer\n", + cfg_general->name, cfg_general->line, interval); + } /* One memory page which each plugin can use to buffer output. * Even though it’s unclean, we just assume that the user will not -- 2.39.5