Skip to content

Commit f2db52c

Browse files
committed
Merge branch 'js/mingw-needs-hiding-fix'
Fix for a (rather old) buffer-overrun bug. * js/mingw-needs-hiding-fix: mingw: avoid a buffer overrun in `needs_hiding()`
2 parents 566a143 + 60e6569 commit f2db52c

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
@@ -363,6 +363,8 @@ static inline int needs_hiding(const char *path)
363363
/* ignore trailing slashes */
364364
if (*path)
365365
basename = path;
366+
else
367+
break;
366368
}
367369

368370
if (hide_dotfiles == HIDE_DOTFILES_TRUE)

0 commit comments

Comments
 (0)