--- parser.c.orig 2014-04-09 21:32:11.925061866 -0700 +++ parser.c 2014-04-09 21:33:19.424640716 -0700 @@ -288,7 +288,7 @@ * are comment characters or empty */ while ((fgets(buf, MAX_LINE_LENGTH, file)) != NULL) { - int i; + int i, idxlen; char *index; char *ret_line; @@ -307,7 +307,8 @@ continue; /* Trim off any whitespace at the end of the line */ - for (i = strlen(index); i > 0; i--) + idxlen = strlen(index); + for (i = idxlen; i > 0; i--) { if (!isspace((int)index[i - 1])) break;