configfile.c:63:14: warning: array subscript is above array [-Warray-bounds]

Kent Overstreet koverstreet at
Mon Jun 3 22:21:31 CEST 2013

Just saw that when building 52c926c with gcc 4.6.2, the line of code is
        line[i + 1] = 0;
        return i;

Took a look at the code and it looks like a real buffer overflow. But it
also looks like the code would be a lot simpler if you just used
getline() from glibc (and if you don't want to be tied to glibc, just
reimplement it and ideally push it to some other C library).

More information about the CGit mailing list