It is important when parsing configuration file to ensure that at
least one word is empty to mark the end of the line. This will be
required with ACLs in order to avoid reading past the end of line.
FILE *f;
int linenum = 0;
char *end;
- char *args[MAX_LINE_ARGS];
+ char *args[MAX_LINE_ARGS + 1];
int arg;
int cfgerr = 0;
int nbchk, mininter;
if (!**args)
continue;
- /* zero out remaining args */
- while (++arg < MAX_LINE_ARGS) {
+ /* zero out remaining args and ensure that at least one entry
+ * is zeroed out.
+ */
+ while (++arg <= MAX_LINE_ARGS) {
args[arg] = line;
}