summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sha1_file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sha1_file.c b/sha1_file.c
index 4fa4b185f3..20a9d39c00 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -3722,7 +3722,7 @@ int index_path(unsigned char *sha1, const char *path, struct stat *st, unsigned
int read_pack_header(int fd, struct pack_header *header)
{
- if (read_in_full(fd, header, sizeof(*header)) < sizeof(*header))
+ if (read_in_full(fd, header, sizeof(*header)) != sizeof(*header))
/* "eof before pack header was fully read" */
return PH_ERROR_EOF;