Merge branch 'rs/tag-null-pointer-arith-fix'
[gitweb.git] / csum-file.c
index a172199e44bf370cd66ee7073f5a2228fd9679ef..2adae04073816a781d01d85433d8d8922baafd7f 100644 (file)
@@ -19,7 +19,7 @@ static void flush(struct sha1file *f, const void *buf, unsigned int count)
 
                if (ret < 0)
                        die_errno("%s: sha1 file read error", f->name);
-               if (ret < count)
+               if (ret != count)
                        die("%s: sha1 file truncated", f->name);
                if (memcmp(buf, check_buffer, count))
                        die("sha1 file '%s' validation error", f->name);