1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Merge branch 'PHP-8.2' into PHP-8.3

* PHP-8.2:
  Fix uninitialized memory in network.c
This commit is contained in:
Niels Dossche
2024-07-22 22:25:53 +02:00
2 changed files with 2 additions and 2 deletions

1
NEWS
View File

@@ -8,6 +8,7 @@ PHP NEWS
. Fixed bug GH-15023 (Memory leak in Zend/zend_ini.c). (nielsdos)
. Fixed bug GH-13330 (Append -Wno-implicit-fallthrough flag conditionally).
(Peter Kokot)
. Fix uninitialized memory in network.c. (nielsdos)
- Curl:
. Fixed case when curl_error returns an empty string.

View File

@@ -861,7 +861,7 @@ php_socket_t php_network_connect_socket_to_host(const char *host, unsigned short
#if HAVE_IPV6 && HAVE_INET_PTON
struct sockaddr_in6 in6;
#endif
} local_address;
} local_address = {0};
int local_address_len = 0;
if (sa->sa_family == AF_INET) {
@@ -873,7 +873,6 @@ php_socket_t php_network_connect_socket_to_host(const char *host, unsigned short
local_address_len = sizeof(struct sockaddr_in);
local_address.in4.sin_family = sa->sa_family;
local_address.in4.sin_port = htons(bindport);
memset(&(local_address.in4.sin_zero), 0, sizeof(local_address.in4.sin_zero));
}
}
#if HAVE_IPV6 && HAVE_INET_PTON