Skip to content

Commit

Permalink
increase buffer length check
Browse files Browse the repository at this point in the history
  • Loading branch information
dtkerns committed Nov 22, 2024
1 parent 77a4c5a commit d046310
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -2991,7 +2991,7 @@ readfile(char *fname, int eraseflg)
return 0;
}
*save = '|';
if ((strlen(save) + strlen(fname) + 2) > PATHLEN) {
if ((strlen(save) + strlen(fname) + 4) > PATHLEN) {
error("Path too long");
return 0;
}
Expand Down

0 comments on commit d046310

Please sign in to comment.