Merge branch 'nd/hash-object-sanity'

* nd/hash-object-sanity:
  Make hash-object more robust against malformed objects

Conflicts:
	cache.h
This commit is contained in:
Junio C Hamano
2011-02-27 21:58:30 -08:00
5 changed files with 63 additions and 10 deletions

View File

@ -92,7 +92,7 @@ static int ce_compare_data(struct cache_entry *ce, struct stat *st)
if (fd >= 0) {
unsigned char sha1[20];
if (!index_fd(sha1, fd, st, 0, OBJ_BLOB, ce->name))
if (!index_fd(sha1, fd, st, 0, OBJ_BLOB, ce->name, 0))
match = hashcmp(sha1, ce->sha1);
/* index_fd() closed the file descriptor already */
}