From 50e70d32f056c20db760328774d27524648fb739 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Tue, 4 Jun 2013 14:47:53 +0000 Subject: Use strbuf for reading configuration files 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. Signed-off-by: Lukas Fleischer --- configfile.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'configfile.h') diff --git a/configfile.h b/configfile.h index 04235e5..af7ca19 100644 --- a/configfile.h +++ b/configfile.h @@ -1,6 +1,8 @@ #ifndef CONFIGFILE_H #define CONFIGFILE_H +#include "cgit.h" + typedef void (*configfile_value_fn)(const char *name, const char *value); extern int parse_configfile(const char *filename, configfile_value_fn fn); -- cgit v1.2.1