Here is the function in question:
static int read_config_line(FILE *f, char *line, const char **value,
int bufsize)
{
int i = 0, isname = 0;
*value = NULL;
while (i bufsize - 1) {
int c = next_char(f);
if (!isname (c == '#' || c == ';'))
Use struct strbuf from Git instead of fixed-size buffers to remove the
limit on the length of configuration file lines and refactor
read_config_line() to improve readability.
Note that this also fixes a buffer overflow that existed with the
original fixed-size buffer implementation.
On Tue, Jun 04, 2013 at 04:47:53PM +0200, Lukas Fleischer wrote:
Use struct strbuf from Git instead of fixed-size buffers to remove the
limit on the length of configuration file lines and refactor
read_config_line() to improve readability.
Note that this also fixes a buffer overflow that
Looks mostly okay. While you're at it, what about fixing the BUG mentioned
at the bottom of cgitrc.5.txt?
___
CGit mailing list
CGit@lists.zx2c4.com
http://lists.zx2c4.com/mailman/listinfo/cgit