From 06b1ac8cc9bf4d5d569b771729734abb38b93a19 Mon Sep 17 00:00:00 2001 From: Stefan Eissing Date: Tue, 26 Aug 2025 17:01:46 +0200 Subject: [PATCH] use SIZE_T_MAX instead --- lib/bufq.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/bufq.c b/lib/bufq.c index a8dcf2d487..ff6b15900c 100644 --- a/lib/bufq.c +++ b/lib/bufq.c @@ -30,9 +30,6 @@ #include "curl_memory.h" #include "memdebug.h" -#ifndef SIZE_MAX -#define SIZE_MAX ((size_t) ~0) -#endif static bool chunk_is_empty(const struct buf_chunk *chunk) { @@ -179,7 +176,7 @@ static CURLcode bufcp_take(struct bufc_pool *pool, } /* Check for integer overflow before allocation */ - if(pool->chunk_size > SIZE_MAX - sizeof(*chunk)) { + if(pool->chunk_size > SIZE_T_MAX - sizeof(*chunk)) { *pchunk = NULL; return CURLE_OUT_OF_MEMORY; }