Skip to content

Commit

Permalink
cnid_dbd: Set explicit max length of db_params to prevent buffer over…
Browse files Browse the repository at this point in the history
…flow, GitHub #694
  • Loading branch information
rdmark committed Sep 22, 2024
1 parent c21cbe2 commit a2b07bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion etc/cnid_dbd/db_param.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ struct db_param *db_param_read(char *dir)
}
parse_err = 0;

while ((items = fscanf(fp, " %s %s", key, val)) != EOF) {
while ((items = fscanf(fp, " %64s %1024s", key, val)) != EOF) {
if (items != 2) {
LOG(log_error, logtype_cnid, "error parsing config file");
parse_err++;
Expand Down

0 comments on commit a2b07bb

Please sign in to comment.