From: Dietmar Maurer Date: Tue, 12 Sep 2017 10:16:34 +0000 (+0200) Subject: do not access element outside array bounds X-Git-Url: https://git.proxmox.com/?p=pmg-log-tracker.git;a=commitdiff_plain;h=952866a348f815a50b6d649494eb04072b6fe14e do not access element outside array bounds --- diff --git a/pmg-log-tracker.c b/pmg-log-tracker.c index 99bfee1..2af777a 100644 --- a/pmg-log-tracker.c +++ b/pmg-log-tracker.c @@ -1383,7 +1383,7 @@ parser_new () //return NULL; //} - for (i = 0; i <= MAX_LOGFILES; i++) { + for (i = 0; i < MAX_LOGFILES; i++) { gettimeofday(&tv, NULL); tv.tv_sec -= 3600*24*i; ltime = localtime (&tv.tv_sec);