diff --git a/unpack-objects.c b/unpack-objects.c
index 91a71c55c6bb720c7fbe3d1d2bd393d5d22f764f..a792b92ece0770e5c2305b26d70eb26ee51d26c7 100644 (file)
--- a/unpack-objects.c
+++ b/unpack-objects.c
* Total size:
* - 256 index entries 4 bytes each
* - 24-byte entries * nr (20-byte sha1 + 4-byte offset)
+ * - 20-byte SHA1 of the packfile
* - 20-byte SHA1 file checksum
*/
- if (index_size != 4*256 + nr * 24 + 20)
+ if (index_size != 4*256 + nr * 24 + 20 + 20)
return error("wrong index file size");
nr_entries = nr;