1. Stefan Saasen
  2. git

Commits

Shawn O. Pearce  committed aff787b Merge

Merge branch 'gfi-maint' into gfi-master

* gfi-maint:
Don't allow empty pathnames in fast-import
import-tars: be nice to wrong directory modes

  • Participants
  • Parent commits 4342572, ec771a7
  • Branches master

Comments (0)

Files changed (2)

File contrib/fast-import/import-tars.perl

View file
 			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;

File fast-import.c

View file
 		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];