diff --git a/lib/bup/_helpers.c b/lib/bup/_helpers.c index 2790b07..b418900 100644 --- a/lib/bup/_helpers.c +++ b/lib/bup/_helpers.c @@ -1128,7 +1128,7 @@ static PyObject *write_idx(PyObject *self, PyObject *args) PyList_Sort(part); uint32_t plen; if (!INTEGRAL_ASSIGNMENT_FITS(&plen, PyList_GET_SIZE(part)) - || UINT32_MAX - count < plen) { + || UINT32_MAX - count < (uint32_t) plen) { PyErr_Format(PyExc_OverflowError, "too many objects in index part"); goto clean_and_return; }