Fix LONG_CHECK_VALID_INT in socket extension

This commit is contained in:
Pierrick Charron 2022-06-09 12:34:36 -04:00
parent 52eb52d652
commit e2d55f2f12
No known key found for this signature in database
GPG key ID: 286AF1F9897469DC

View file

@ -72,7 +72,7 @@ inline ssize_t sendmsg(int sockfd, const struct msghdr *msg, int flags)
#define LONG_CHECK_VALID_INT(l, arg_pos) \
do { \
if ((l) < INT_MIN && (l) > INT_MAX) { \
if ((l) < INT_MIN || (l) > INT_MAX) { \
zend_argument_value_error((arg_pos), "must be between %d and %d", INT_MIN, INT_MAX); \
RETURN_THROWS(); \
} \