summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 87859f3)
raw | patch | inline | side by side (parent: 87859f3)
author | Shawn O. Pearce <spearce@spearce.org> | |
Sun, 29 Apr 2007 00:01:27 +0000 (20:01 -0400) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Sun, 29 Apr 2007 00:03:25 +0000 (20:03 -0400) |
riddochc on #git noticed corruption caused by import-tars. This
was fixed in the prior commit by Dscho, but fast-import was wrong
to have allowed a tree to be created with an empty string as the
filename. No operating system allows this, and Git itself doesn't
accept this into the index.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
was fixed in the prior commit by Dscho, but fast-import was wrong
to have allowed a tree to be created with an empty string as the
filename. No operating system allows this, and Git itself doesn't
accept this into the index.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
fast-import.c | patch | blob | history |
diff --git a/fast-import.c b/fast-import.c
index cdd629d6bc547609daabab6c1f3b73939fddb7b9..6c43a0d37f781294a8844ea52c9ce9728396f456 100644 (file)
--- a/fast-import.c
+++ b/fast-import.c
n = slash1 - p;
else
n = strlen(p);
+ if (!n)
+ die("Empty path component found in input");
for (i = 0; i < t->entry_count; i++) {
e = t->entries[i];