This subject says it all. The leak is minor, the fix could be made something like this:
diff -u -r1.21 utils.c --- utils.c 2001/05/27 19:35:12 1.21 +++ utils.c 2001/11/20 10:10:17 @@ -903,7 +903,12 @@ while (fgets (line + length, bufsize - length, fp)) { length += strlen (line + length); - assert (length > 0); + if (0 == length) + { + /* bad input file */ + xfree(line); + return NULL; + } if (line[length - 1] == '\n') break; /* fgets() guarantees to read the whole line, or to use up the -- Daniel Stenberg - http://daniel.haxx.se - +46-705-44 31 77 ech`echo xiun|tr nu oc|sed 'sx\([sx]\)\([xoi]\)xo un\2\1 is xg'`ol