From 5466d7586816ea1de67e38fdf4882a2ad97a57b5 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Tue, 24 Feb 2026 20:35:53 +0000 Subject: [PATCH] ext/pcntl: fix pcntl_forkx (for solaris/illumos) flags range check. --- ext/pcntl/pcntl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/pcntl/pcntl.c b/ext/pcntl/pcntl.c index 082bdc4ba90e..e02e3e69d8b8 100644 --- a/ext/pcntl/pcntl.c +++ b/ext/pcntl/pcntl.c @@ -1549,7 +1549,7 @@ PHP_FUNCTION(pcntl_forkx) Z_PARAM_LONG(flags) ZEND_PARSE_PARAMETERS_END(); - if (flags < FORK_NOSIGCHLD || flags > FORK_WAITPID) { + if (flags & ~(FORK_NOSIGCHLD | FORK_WAITPID)) { zend_argument_value_error(1, "must be FORK_NOSIGCHLD or FORK_WAITPID"); RETURN_THROWS(); }