Merge branch 'jc/upload-corrupt' into next

* jc/upload-corrupt:
  upload-pack/fetch-pack: support side-band communication
  Retire git-clone-pack
  upload-pack: prepare for sideband message support.
  upload-pack: avoid sending an incomplete pack upon failure
  Fix possible out-of-bounds array access
This commit is contained in:
Junio C Hamano
2006-06-21 02:50:59 -07:00
17 changed files with 342 additions and 296 deletions

View File

@ -29,10 +29,11 @@ static int pathspec_matches(const char **paths, const char *name)
int matchlen = strlen(match);
const char *cp, *meta;
if ((matchlen <= namelen) &&
!strncmp(name, match, matchlen) &&
(match[matchlen-1] == '/' ||
name[matchlen] == '\0' || name[matchlen] == '/'))
if (!matchlen ||
((matchlen <= namelen) &&
!strncmp(name, match, matchlen) &&
(match[matchlen-1] == '/' ||
name[matchlen] == '\0' || name[matchlen] == '/')))
return 1;
if (!fnmatch(match, name, 0))
return 1;