Skip to content

Commit 04e429b

Browse files
committed
Fix ext/socket
1 parent 1187f99 commit 04e429b

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
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();

ext/zend_test/test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1016,7 +1016,7 @@ static ZEND_FUNCTION(zend_test_is_zend_ptr)
10161016
Z_PARAM_LONG(addr);
10171017
ZEND_PARSE_PARAMETERS_END();
10181018

1019-
RETURN_BOOL(is_zend_ptr((void*)addr));
1019+
RETURN_BOOL(is_zend_ptr((void*)(intptr_t)addr));
10201020
}
10211021

10221022
static ZEND_FUNCTION(zend_test_log_err_debug)

0 commit comments

Comments
 (0)