Skip to content

Commit

Permalink
lib: monkey: increase rconf line limit to 1KB (#301)
Browse files Browse the repository at this point in the history
Signed-off-by: Eduardo Silva <[email protected]>
  • Loading branch information
edsiper committed Jun 26, 2017
1 parent e709704 commit 2fbd81b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/monkey/mk_core/mk_rconf.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ struct mk_rconf *mk_rconf_open(const char *path)
int line = 0;
int indent_len = -1;
int n_keys = 0;
char buf[255];
char buf[1024];
char *section = NULL;
char *indent = NULL;
char *key, *val;
Expand All @@ -131,7 +131,7 @@ struct mk_rconf *mk_rconf_open(const char *path)
mk_list_init(&conf->sections);

/* looking for configuration directives */
while (fgets(buf, 255, f)) {
while (fgets(buf, sizeof(buf) - 1, f)) {
len = strlen(buf);
if (buf[len - 1] == '\n') {
buf[--len] = 0;
Expand Down

0 comments on commit 2fbd81b

Please sign in to comment.