This is an automated email from the ASF dual-hosted git repository. ChristopherSchultz pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/tomcat-connectors.git
commit 197c7baf308002b327abbc8f885ede8aa94351cb Author: Christopher Schultz <[email protected]> AuthorDate: Mon Jun 8 11:43:09 2026 -0400 Avoid overflow on alignment adjustment --- native/common/jk_pool.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/native/common/jk_pool.c b/native/common/jk_pool.c index 5c8de05e9..9adbfa761 100644 --- a/native/common/jk_pool.c +++ b/native/common/jk_pool.c @@ -64,6 +64,11 @@ void *jk_pool_alloc(jk_pool_t *p, size_t size) if (size == 0) return NULL; + + if (sz > SIZE_MAX - JK_ALIGN_DEFAULT(1)) { + return NULL; + } + size = JK_ALIGN_DEFAULT(size); if ((p->size - p->pos) >= size) { rc = &(p->buf[p->pos]); --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
