Browse Source

Increased max config line size from 512 to 8192 bytes

Sergey Lyubka 13 years ago
parent
commit
79df70f519
1 changed files with 2 additions and 1 deletions
  1. 2 1
      main.c

+ 2 - 1
main.c

@@ -54,6 +54,7 @@
 #endif // _WIN32
 
 #define MAX_OPTIONS 40
+#define MAX_CONF_FILE_LINE_SIZE (8 * 1024)
 
 static int exit_flag;
 static char server_name[40];        // Set by init_server_name()
@@ -154,7 +155,7 @@ static void set_option(char **options, const char *name, const char *value) {
 }
 
 static void process_command_line_arguments(char *argv[], char **options) {
-  char line[512], opt[512], val[512], *p;
+  char line[MAX_CONF_FILE_LINE_SIZE], opt[sizeof(line)], val[sizeof(line)], *p;
   FILE *fp = NULL;
   size_t i, cmd_line_opts_start = 1, line_no = 0;