summaryrefslogtreecommitdiff
path: root/compat/mingw.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2019-10-30 15:13:13 +0900
committerLibravatar Junio C Hamano <gitster@pobox.com>2019-10-30 15:13:13 +0900
commitf2db52c46b79d5b99c57fbe713a9ff211b840b89 (patch)
tree6099bc48951cfa0498140bbe2b4dd8b421d438cb /compat/mingw.c
parentGit 2.24-rc1 (diff)
parentmingw: avoid a buffer overrun in `needs_hiding()` (diff)
downloadtgif-f2db52c46b79d5b99c57fbe713a9ff211b840b89.tar.xz
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()`
Diffstat (limited to 'compat/mingw.c')
-rw-r--r--compat/mingw.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/compat/mingw.c b/compat/mingw.c
index 6b765d936c..fe609239dd 100644
--- a/compat/mingw.c
+++ b/compat/mingw.c
@@ -363,6 +363,8 @@ static inline int needs_hiding(const char *path)
/* ignore trailing slashes */
if (*path)
basename = path;
+ else
+ break;
}
if (hide_dotfiles == HIDE_DOTFILES_TRUE)