Commit ceaaff06 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Pass an explicit length to parse_config_from_string.

parent fbb45a08
......@@ -292,7 +292,7 @@ main(int argc, char **argv)
config_files[num_config_files++] = optarg;
break;
case 'C':
rc = parse_config_from_string(optarg);
rc = parse_config_from_string(optarg, strlen(optarg));
if(rc < 0) {
fprintf(stderr,
"Couldn't parse configuration from command line.\n");
......
......@@ -938,9 +938,9 @@ gnc_buf(struct buf_state *s)
}
int
parse_config_from_string(char *string)
parse_config_from_string(char *string, int n)
{
struct buf_state s = { string, 0, strlen(string) };
struct buf_state s = { string, 0, n };
return parse_config((gnc_t)gnc_buf, &s);
}
......
......@@ -47,7 +47,7 @@ struct filter {
extern struct interface_conf *default_interface_conf;
int parse_config_from_file(const char *filename, int *line_return);
int parse_config_from_string(char *string);
int parse_config_from_string(char *string, int n);
void renumber_filters(void);
int input_filter(const unsigned char *id,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment