From: Arran Cudbard-Bell Date: Sun, 5 Aug 2018 23:05:18 +0000 (-0400) Subject: Bad arithmetic in talloc_page_aligned_pool X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e2fd22a40ecf9df653a269c4aa9fdb0fc493cadd;p=thirdparty%2Ffreeradius-server.git Bad arithmetic in talloc_page_aligned_pool --- diff --git a/src/lib/util/talloc.c b/src/lib/util/talloc.c index 6605920f11b..e2ce6ced439 100644 --- a/src/lib/util/talloc.c +++ b/src/lib/util/talloc.c @@ -185,7 +185,7 @@ TALLOC_CTX *talloc_page_aligned_pool(TALLOC_CTX *ctx, void **start, void **end, talloc_free(pool); return NULL; } - hdr_size = (uintptr_t)pool - (uintptr_t)chunk; + hdr_size = (uintptr_t)chunk - (uintptr_t)pool; next = (void *)ROUND_UP((uintptr_t)chunk, page_size); /* Round up address to the next page */