Skip to content

Commit 9337df0

Browse files
committed
Merge pull request #2371 from dscho/fix-needs-hiding-buffer-overrun
Avoid a buffer overrun in `needs_hiding()`
2 parents 53c7f70 + 807a631 commit 9337df0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

compat/mingw.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,8 @@ static inline int needs_hiding(const char *path)
376376
/* ignore trailing slashes */
377377
if (*path)
378378
basename = path;
379+
else
380+
break;
379381
}
380382

381383
if (hide_dotfiles == HIDE_DOTFILES_TRUE)

0 commit comments

Comments
 (0)