Commit c9ea4410268 for php
commit c9ea4410268e0b78f7a3e83cf81c3c7c468382f3
Merge: 5c957c57fbb 4d426d14235
Author: Jorg Sowa <jorg.sowa@gmail.com>
Date: Sat Nov 28 10:39:07 2026 +0100
Merge branch 'PHP-8.5' into PHP-8.6
# Conflicts:
# NEWS
# ext/sockets/sockets.c
diff --cc NEWS
index 3107c32f872,6281b34cc19..2dfdf7e9b21
--- a/NEWS
+++ b/NEWS
@@@ -281,7 -234,25 +281,10 @@@ PH
- Sockets:
. Fixed bug GH-25530 (socket_last_error() without a socket returns an error
from a previous request). (Artem Ukrainskiy)
+ . Fixed host names being truncated at NUL bytes in socket_addrinfo_lookup(),
+ socket_bind(), socket_connect(), socket_sendto() and socket_sendmsg().
+ (Jorg Sowa)
-- Session:
- . Fixed session upload progress to respect session.use_only_cookies.
- (jorgsowa)
-
-- SimpleXML:
- . Fixed a crash with opcache when simplexml_load_string(),
- simplexml_load_file() or simplexml_import_dom() is given a class whose
- property defaults use constants. A class with an undefined constant now
- throws an Error instead of returning an object with unresolved values.
- (Ilia Alshanetsky)
-
-- Sockets:
- . Fixed socket_addrinfo_lookup() rejecting an empty packed hints array.
- (lacatoire)
-
- Sodium:
. Fixed sodium_add() and sodium_increment() retaining stale string hashes
and UTF-8 validity flags. (lacatoire)
diff --cc ext/sockets/sockets.c
index 423be987e03,6954f9a8dc9..7c04d8965ea
--- a/ext/sockets/sockets.c
+++ b/ext/sockets/sockets.c
@@@ -2811,12 -2785,11 +2841,12 @@@ PHP_FUNCTION(socket_addrinfo_lookup
struct addrinfo hints, *result, *rp;
php_addrinfo *res;
- ZEND_PARSE_PARAMETERS_START(1, 3)
+ ZEND_PARSE_PARAMETERS_START(1, 4)
- Z_PARAM_STR(hostname)
+ Z_PARAM_PATH_STR(hostname)
Z_PARAM_OPTIONAL
- Z_PARAM_STR_OR_NULL(service)
- Z_PARAM_PATH_OR_NULL(service, service_len)
++ Z_PARAM_PATH_STR_OR_NULL(service)
Z_PARAM_ARRAY(zhints)
+ Z_PARAM_ZVAL_OR_NULL(error_code)
ZEND_PARSE_PARAMETERS_END();
memset(&hints, 0, sizeof(hints));