Skip to content

Commit 65ecf52

Browse files
committed
Fix ext/socket
1 parent 4a11068 commit 65ecf52

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ext/sockets/sendrecvmsg.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,9 @@ PHP_FUNCTION(socket_cmsg_space)
316316
size_t size = entry->size + n * entry->var_el_size;
317317
size_t total_size = CMSG_SPACE(size);
318318
if (n > n_max /* zend_long overflow */
319+
#if SIZEOF_SIZE_T >= SIZEOF_ZEND_LONG
319320
|| total_size > ZEND_LONG_MAX
321+
#endif
320322
|| total_size < size /* align overflow */) {
321323
zend_argument_value_error(3, "is too large");
322324
RETURN_THROWS();

0 commit comments

Comments
 (0)