summaryrefslogtreecommitdiff
path: root/src/tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tree.c')
-rw-r--r--src/tree.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/tree.c b/src/tree.c
index 150f90c44..6f9838880 100644
--- a/src/tree.c
+++ b/src/tree.c
@@ -374,6 +374,9 @@ static int append_entry(
{
git_tree_entry *entry;
+ if (!valid_entry_name(filename))
+ return tree_error("Failed to insert entry. Invalid name for a tree entry");
+
entry = alloc_entry(filename);
GITERR_CHECK_ALLOC(entry);