Submitter | Matt Harbison |
---|---|
Date | March 10, 2018, 3:07 a.m. |
Message ID | <1f313a913f4356f272ef.1520651222@Envy> |
Download | mbox | patch |
Permalink | /patch/29231/ |
State | Accepted |
Headers | show |
Comments
Patch
diff --git a/mercurial/thirdparty/xdiff/xprepare.c b/mercurial/thirdparty/xdiff/xprepare.c --- a/mercurial/thirdparty/xdiff/xprepare.c +++ b/mercurial/thirdparty/xdiff/xprepare.c @@ -71,7 +71,7 @@ cf->flags = flags; cf->hbits = xdl_hashbits(size); - cf->hsize = 1 << cf->hbits; + cf->hsize = ((uint64_t)1) << cf->hbits; if (xdl_cha_init(&cf->ncha, sizeof(xdlclass_t), size / 4 + 1) < 0) { @@ -263,7 +263,7 @@ { hbits = xdl_hashbits(narec); - hsize = 1 << hbits; + hsize = ((uint64_t)1) << hbits; if (!(rhash = (xrecord_t **) xdl_malloc(hsize * sizeof(xrecord_t *)))) goto abort; memset(rhash, 0, hsize * sizeof(xrecord_t *));