]> git.ipfire.org Git - thirdparty/git.git/blobdiff - pack-revindex.c
Merge branch 'jk/4gb-idx'
[thirdparty/git.git] / pack-revindex.c
index d28a7e43d0bd80c3dc968439b3262da7c80117c1..ecdde39cf446f31e4c07f4d80cdb3767272c9cc8 100644 (file)
@@ -130,7 +130,7 @@ static void create_pack_revindex(struct packed_git *p)
 
        if (p->index_version > 1) {
                const uint32_t *off_32 =
-                       (uint32_t *)(index + 8 + p->num_objects * (hashsz + 4));
+                       (uint32_t *)(index + 8 + (size_t)p->num_objects * (hashsz + 4));
                const uint32_t *off_64 = off_32 + p->num_objects;
                for (i = 0; i < num_ent; i++) {
                        const uint32_t off = ntohl(*off_32++);