From: Rob Browning Date: Sun, 22 Nov 2020 18:27:27 +0000 (-0600) Subject: write_idx: make the 64-bit offset count uint32_t not int X-Git-Tag: 0.32~29 X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eaaa76ded31665d05be2cd950554569dc9d3ec00;hp=5d153a347a2732fc117c655f842f019c5e52877c;p=bup.git write_idx: make the 64-bit offset count uint32_t not int It's a 31-bit offset into the 64-bit object offsets table. https://github.com/git/git/blob/master/Documentation/technical/pack-format.txt Signed-off-by: Rob Browning Tested-by: Rob Browning --- diff --git a/lib/bup/_helpers.c b/lib/bup/_helpers.c index cf31d0a..f47de73 100644 --- a/lib/bup/_helpers.c +++ b/lib/bup/_helpers.c @@ -1087,7 +1087,7 @@ static PyObject *write_idx(PyObject *self, PyObject *args) PyObject *part; unsigned int total = 0; uint32_t count; - int i, ofs64_count; + int i; uint32_t *fan_ptr, *crc_ptr, *ofs_ptr; uint64_t *ofs64_ptr; struct sha *sha_ptr; @@ -1119,7 +1119,7 @@ static PyObject *write_idx(PyObject *self, PyObject *args) ofs64_ptr = (uint64_t *)&ofs_ptr[total]; count = 0; - ofs64_count = 0; + uint32_t ofs64_count = 0; for (i = 0; i < FAN_ENTRIES; ++i) { part = PyList_GET_ITEM(idx, i);