[php-src] PHP-8.2: ext/sockets: socket_create_listen clearing socket data before binding.
| From: | David Carlier | Date: | Sun, 31 Mar 2024 16:01:46 +0000 |
| Subject: | [php-src] PHP-8.2: ext/sockets: socket_create_listen clearing socket data before binding. | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-127915@lists.php.net to get a copy of this message | ||
Author: David Carlier (devnexen)
Date: 2024-03-31T17:00:54+01:00
Commit: https://github.com/php/php-src/commit/ba4c82fd8012d987abfb3e2efb43e0921e526b3d
Raw diff: https://github.com/php/php-src/commit/ba4c82fd8012d987abfb3e2efb43e0921e526b3d.diff
ext/sockets: socket_create_listen clearing socket data before binding.
Close GH-13855
Changed paths:
M ext/sockets/sockets.c
Diff:
diff --git a/ext/sockets/sockets.c b/ext/sockets/sockets.c
index 73ba905f9c324..8183398a8d322 100644
--- a/ext/sockets/sockets.c
+++ b/ext/sockets/sockets.c
@@ -219,7 +219,7 @@ int inet_ntoa_lock = 0;
static int php_open_listen_sock(php_socket *sock, int port, int backlog) /* {{{ */
{
- struct sockaddr_in la;
+ struct sockaddr_in la = {0};
struct hostent *hp;
#ifndef PHP_WIN32