mirror of
https://github.com/php/php-src.git
synced 2024-11-23 01:44:06 +08:00
Merge branch 'PHP-8.3'
* PHP-8.3: Fix undefined behaviour in fastcgi.c (#14269)
This commit is contained in:
commit
ba534e70e6
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user