Skip to content

Commit

Permalink
Fix possible buffer overflow in conf parser
Browse files Browse the repository at this point in the history
  • Loading branch information
fihuer committed Feb 7, 2023
1 parent 4962404 commit 1f305aa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/api/confparse/conf_lex.c
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ void set_error(char * s);
char err_str[ERRLEN]="";

/* Stockage des chaines */
char YY_PARSED_STRING[MAXSTRLEN];
char YY_PARSED_STRING[MAXSTRLEN+1];

void YY_BUFFER_APPEND(char * s){
strncat( YY_PARSED_STRING,s, MAXSTRLEN);
Expand Down
2 changes: 1 addition & 1 deletion src/api/confparse/conf_lex.l
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ void set_error(char * s);
char err_str[ERRLEN]="";

/* Stockage des chaines */
char YY_PARSED_STRING[MAXSTRLEN];
char YY_PARSED_STRING[MAXSTRLEN+1];

void YY_BUFFER_APPEND(char * s){
strncat( YY_PARSED_STRING,s, MAXSTRLEN);
Expand Down

0 comments on commit 1f305aa

Please # to comment.