From: Rob Browning Date: Sat, 8 Aug 2020 17:27:51 +0000 (-0500) Subject: bup_mincore: actually use size_t value (not ulonglong) in call X-Git-Tag: 0.31~14 X-Git-Url: https://arthur.barton.de/gitweb/?p=bup.git;a=commitdiff_plain;h=ba836360f66ed046be1af98904a36a4ce862ca62 bup_mincore: actually use size_t value (not ulonglong) in call We'd already done the correct conversion, but weren't using it. Reported-by: Greg Troxel Signed-off-by: Rob Browning --- diff --git a/lib/bup/_helpers.c b/lib/bup/_helpers.c index ff4eb7a..489bd14 100644 --- a/lib/bup/_helpers.c +++ b/lib/bup/_helpers.c @@ -1724,7 +1724,7 @@ static PyObject *bup_mincore(PyObject *self, PyObject *args) result = PyErr_Format(PyExc_OverflowError, "src_n overflows size_t"); goto clean_and_return; } - int rc = mincore((void *)(src.buf + src_off), src_n, + int rc = mincore((void *)(src.buf + src_off), length, (BUP_MINCORE_BUF_TYPE *) (dest.buf + dest_off)); if (rc != 0) { result = PyErr_SetFromErrno(PyExc_OSError);