summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2019-10-30 06:13:13 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-10-30 06:13:13 (GMT)
commitf2db52c46b79d5b99c57fbe713a9ff211b840b89 (patch)
tree6099bc48951cfa0498140bbe2b4dd8b421d438cb
parent566a1439f6f56c2171b8853ddbca0ad3f5098770 (diff)
parent60e6569a1207d75a351684e2c48f8d18d15a0032 (diff)
downloadgit-f2db52c46b79d5b99c57fbe713a9ff211b840b89.zip
git-f2db52c46b79d5b99c57fbe713a9ff211b840b89.tar.gz
git-f2db52c46b79d5b99c57fbe713a9ff211b840b89.tar.bz2
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()`
-rw-r--r--compat/mingw.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/compat/mingw.c b/compat/mingw.c
index 6b765d9..fe60923 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)