From 2abe2a5ed5de766721a3f2461ff72e9f0cd7e1fc Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 16 Nov 2022 08:28:00 +0100 Subject: [PATCH] Fix #522 Signed integer overflow --- php_memcached.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/php_memcached.c b/php_memcached.c index 7ccc9b58..ece54408 100644 --- a/php_memcached.c +++ b/php_memcached.c @@ -86,7 +86,7 @@ static int php_memc_list_entry(void) { /**************************************** Payload value flags ****************************************/ -#define MEMC_CREATE_MASK(start, n_bits) (((1 << n_bits) - 1) << start) +#define MEMC_CREATE_MASK(start, n_bits) (((1U << n_bits) - 1) << start) #define MEMC_MASK_TYPE MEMC_CREATE_MASK(0, 4) #define MEMC_MASK_INTERNAL MEMC_CREATE_MASK(4, 12)