Skip to content

Commit

Permalink
Merge pull request #176 from Whali3n51/whali3n51
Browse files Browse the repository at this point in the history
fix a bug of out-of-bounds reading in the domlsd() function in the ls.c
  • Loading branch information
jedisct1 authored Sep 18, 2024
2 parents 8a847f5 + 350d66f commit 6c88ff8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ls.c
Original file line number Diff line number Diff line change
Expand Up @@ -1051,8 +1051,8 @@ void domlsd(const char *base)

if (*base != 0 && chdir(base) != 0) {
if (*base++ == '-') {
while (!isspace((unsigned char) *base++));
while (isspace((unsigned char) *base++));
while (*base!=0 && !isspace((unsigned char) *base++));
while (*base!=0 && isspace((unsigned char) *base++));
if (*base != 0 && chdir(base) != 0) {
addreply_noformat(550, MSG_STAT_FAILURE2);
return;
Expand Down

0 comments on commit 6c88ff8

Please sign in to comment.