Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
fast-import: don't allow 'ls' of path with empty components
[gitweb.git]
/
fast-import.c
diff --git
a/fast-import.c
b/fast-import.c
index fff285cd0f73ca2bfe5b76aa3d87a156ad7808ff..47f61f3cba7b7a4cde8ae116cbce38116562bda6 100644
(file)
--- a/
fast-import.c
+++ b/
fast-import.c
@@
-1640,6
+1640,8
@@
static int tree_content_get(
n = slash1 - p;
else
n = strlen(p);
+ if (!n)
+ die("Empty path component found in input");
if (!root->tree)
load_tree(root);