From 98c741976ba30b5110867e50e047536f5cbcc401 Mon Sep 17 00:00:00 2001 From: Dirk Ziegelmeier Date: Thu, 23 Jun 2016 20:20:19 +0200 Subject: [PATCH] Fix bug #48300: Private mempools allocate foreign memory Add padding to memory pool mem according to alignment --- src/include/lwip/memp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/include/lwip/memp.h b/src/include/lwip/memp.h index 0b6fe043..bb45f6c4 100644 --- a/src/include/lwip/memp.h +++ b/src/include/lwip/memp.h @@ -91,7 +91,7 @@ extern const struct memp_desc* const memp_pools[MEMP_MAX]; #else /* MEMP_MEM_MALLOC */ #define LWIP_MEMPOOL_DECLARE(name,num,size,desc) u8_t memp_memory_ ## name ## _base \ - [((num) * (MEMP_SIZE + MEMP_ALIGN_SIZE(size)))]; \ + [LWIP_MEM_ALIGN_SIZE(((num) * (MEMP_SIZE + MEMP_ALIGN_SIZE(size))))]; \ \ static struct memp *memp_tab_ ## name; \ \