Skip to content

Commit

Permalink
Fix phpGH-13603 ext/sockets: properly initialised address info data.
Browse files Browse the repository at this point in the history
Led to random characters visible on socket id on macOs.
  • Loading branch information
devnexen committed Mar 6, 2024
1 parent 33967ae commit 90002f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ext/sockets/sockets.c
Original file line number Diff line number Diff line change
Expand Up @@ -917,7 +917,7 @@ PHP_FUNCTION(socket_read)
PHP_FUNCTION(socket_getsockname)
{
zval *arg1, *addr, *port = NULL;
php_sockaddr_storage sa_storage;
php_sockaddr_storage sa_storage = {0};
php_socket *php_sock;
struct sockaddr *sa;
struct sockaddr_in *sin;
Expand Down Expand Up @@ -994,7 +994,7 @@ PHP_FUNCTION(socket_getsockname)
PHP_FUNCTION(socket_getpeername)
{
zval *arg1, *arg2, *arg3 = NULL;
php_sockaddr_storage sa_storage;
php_sockaddr_storage sa_storage = {0};
php_socket *php_sock;
struct sockaddr *sa;
struct sockaddr_in *sin;
Expand Down

0 comments on commit 90002f1

Please sign in to comment.