Merge pull request #262 from foutaise/master

Add check for interval value
This commit is contained in:
Ingo Bürk 2018-02-06 12:56:53 +01:00 committed by GitHub
commit 0880b0ec03
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 its unclean, we just assume that the user will not