diff --git a/mercurial/cext/revlog.c b/mercurial/cext/revlog.c --- a/mercurial/cext/revlog.c +++ b/mercurial/cext/revlog.c @@ -1535,7 +1535,7 @@ static PyObject *find_deepest(indexObjec goto bail; } - interesting = calloc(sizeof(*interesting), 1 << revcount); + interesting = calloc(sizeof(*interesting), ((size_t)1) << revcount); if (interesting == NULL) { PyErr_NoMemory(); goto bail;