diff options
-rwxr-xr-x | contrib/fast-import/import-tars.perl | 1 | ||||
-rw-r--r-- | fast-import.c | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/contrib/fast-import/import-tars.perl b/contrib/fast-import/import-tars.perl index 184214689..557508015 100755 --- a/contrib/fast-import/import-tars.perl +++ b/contrib/fast-import/import-tars.perl @@ -52,6 +52,7 @@ foreach my $tar_file (@ARGV) Z8 Z1 Z100 Z6 Z2 Z32 Z32 Z8 Z8 Z*', $_; last unless $name; + next if $name =~ '/$'; $mode = oct $mode; $size = oct $size; $mtime = oct $mtime; diff --git a/fast-import.c b/fast-import.c index c4c8cb905..b4cbcd901 100644 --- a/fast-import.c +++ b/fast-import.c @@ -1199,6 +1199,8 @@ static int tree_content_set( 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]; |