Merge branch 'PHP-8.4'

* PHP-8.4:
  Fix technically incorrect sizeof
This commit is contained in:
Niels Dossche 2025-06-09 22:05:26 +02:00
commit 32c6ac9133
No known key found for this signature in database
GPG key ID: B8A8AD166DF0E2E5

View file

@ -229,7 +229,7 @@ PHPAPI int php_network_getaddresses(const char *host, int socktype, struct socka
for (n = 1; (sai = sai->ai_next) != NULL; n++) for (n = 1; (sai = sai->ai_next) != NULL; n++)
; ;
*sal = safe_emalloc((n + 1), sizeof(*sal), 0); *sal = safe_emalloc((n + 1), sizeof(**sal), 0);
sai = res; sai = res;
sap = *sal; sap = *sal;
@ -264,7 +264,7 @@ PHPAPI int php_network_getaddresses(const char *host, int socktype, struct socka
in = *((struct in_addr *) host_info->h_addr); in = *((struct in_addr *) host_info->h_addr);
} }
*sal = safe_emalloc(2, sizeof(*sal), 0); *sal = safe_emalloc(2, sizeof(**sal), 0);
sap = *sal; sap = *sal;
*sap = emalloc(sizeof(struct sockaddr_in)); *sap = emalloc(sizeof(struct sockaddr_in));
(*sap)->sa_family = AF_INET; (*sap)->sa_family = AF_INET;