Skip to content

Commit 5466d75

Browse files
committed
ext/pcntl: fix pcntl_forkx (for solaris/illumos) flags range check.
1 parent ec5a1e0 commit 5466d75

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/pcntl/pcntl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1549,7 +1549,7 @@ PHP_FUNCTION(pcntl_forkx)
15491549
Z_PARAM_LONG(flags)
15501550
ZEND_PARSE_PARAMETERS_END();
15511551

1552-
if (flags < FORK_NOSIGCHLD || flags > FORK_WAITPID) {
1552+
if (flags & ~(FORK_NOSIGCHLD | FORK_WAITPID)) {
15531553
zend_argument_value_error(1, "must be FORK_NOSIGCHLD or FORK_WAITPID");
15541554
RETURN_THROWS();
15551555
}

0 commit comments

Comments
 (0)