From b6d60256a51417554bb2209a5dab20f8e5bb04f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Linus=20Unneb=C3=A4ck?= Date: Wed, 24 Oct 2018 13:42:00 +0200 Subject: [PATCH] Fix off-by-one error in bin_index_up --- src/malloc/malloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/malloc/malloc.c b/src/malloc/malloc.c index b583c240..74db51b7 100644 --- a/src/malloc/malloc.c +++ b/src/malloc/malloc.c @@ -99,7 +99,7 @@ static int bin_index_up(size_t x) if (x <= 32) return x; x--; if (x < 512) return bin_tab[x/8-4] + 1; - if (x > 0x1c00) return 63; + if (x > 0x1c00) return 64; return bin_tab[x/128-4] + 17; }