summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIngo Bürk <admin@airblader.de>2018-02-06 12:56:53 +0100
committerGitHub <noreply@github.com>2018-02-06 12:56:53 +0100
commit0880b0ec03a7201c2bf178ee7613dcb9eec48fd2 (patch)
tree15acbbf0a900712d0986f358bb7cc70c31294cae
parent1522f58ef0dda8270b5f810757aa0eae961ea042 (diff)
parente23eea9438a15fe64ab03da0f35aa310a10900bf (diff)
Merge pull request #262 from foutaise/master
Add check for interval value
-rw-r--r--i3status.c5
1 files changed, 5 insertions, 0 deletions
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