Skip to content

Commit

Permalink
Merge branch 'maint' of git://repo.or.cz/git/fastimport into maint
Browse files Browse the repository at this point in the history
* 'maint' of git://repo.or.cz/git/fastimport:
  Don't allow empty pathnames in fast-import
  import-tars: be nice to wrong directory modes
  • Loading branch information
Junio C Hamano committed Apr 29, 2007
2 parents cb2cada + ec771a7 commit 5b5fe9a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions contrib/fast-import/import-tars.perl
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
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;
Expand Down
2 changes: 2 additions & 0 deletions fast-import.c
Original file line number Diff line number Diff line change
Expand Up @@ -1193,6 +1193,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];
Expand Down

0 comments on commit 5b5fe9a

Please sign in to comment.