From: Nikita Popov Date: Thu, 20 Jun 2019 14:46:26 +0000 (+0200) Subject: Remove leftover check X-Git-Tag: php-7.4.0alpha2~24 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=59974000eb1fac8973600893df0534610f62ebbb;p=php Remove leftover check This is checked below now in a way that handles misaligned pointers. --- diff --git a/ext/standard/dns.c b/ext/standard/dns.c index 9ab1e138de..d461a39c34 100644 --- a/ext/standard/dns.c +++ b/ext/standard/dns.c @@ -254,7 +254,7 @@ PHP_FUNCTION(gethostbynamel) array_init(return_value); - for (i = 0; hp->h_addr_list[i] != 0 ; i++) { + for (i = 0;; i++) { /* On macos h_addr_list entries may be misaligned. */ struct in_addr *h_addr_entry; /* Don't call this h_addr, it's a macro! */ memcpy(&h_addr_entry, &hp->h_addr_list[i], sizeof(struct in_addr *));