Merge branch 'PHP-8.3'

* PHP-8.3:
  Fix undefined behaviour in fastcgi.c (#14269)
This commit is contained in:
Niels Dossche 2024-05-19 22:57:08 +02:00
commit ba534e70e6
No known key found for this signature in database
GPG Key ID: B8A8AD166DF0E2E5

View File

@ -737,7 +737,7 @@ int fcgi_listen(const char *path, int backlog)
memset(&sa.sa_unix, 0, sizeof(sa.sa_unix));
sa.sa_unix.sun_family = AF_UNIX;
memcpy(sa.sa_unix.sun_path, path, path_len + 1);
sock_len = (size_t)(((struct sockaddr_un *)0)->sun_path) + path_len;
sock_len = XtOffsetOf(struct sockaddr_un, sun_path) + path_len;
#ifdef HAVE_STRUCT_SOCKADDR_UN_SUN_LEN
sa.sa_unix.sun_len = sock_len;
#endif