We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cfcee97 commit 7daf012Copy full SHA for 7daf012
NEWS
@@ -31,6 +31,9 @@ PHP NEWS
31
. Fixed bug #75917 (SplFileObject::seek broken with CSV flags). (Aliaksandr
32
Bystry)
33
34
+- Standard:
35
+ . Fixed bug GH-7748 (gethostbyaddr outputs binary string). (cmb)
36
+
37
02 Dec 2021, PHP 8.1.1
38
39
- IMAP:
ext/standard/dns.c
@@ -182,14 +182,14 @@ static zend_string *php_gethostbyaddr(char *ip)
182
if (inet_pton(AF_INET6, ip, &sa6.sin6_addr)) {
183
sa6.sin6_family = AF_INET6;
184
185
- if (getnameinfo((struct sockaddr *)&sa6, sizeof(sa6), out, sizeof(out), NULL, 0, NI_NAMEREQD) < 0) {
+ if (getnameinfo((struct sockaddr *)&sa6, sizeof(sa6), out, sizeof(out), NULL, 0, NI_NAMEREQD) != 0) {
186
return zend_string_init(ip, strlen(ip), 0);
187
}
188
return zend_string_init(out, strlen(out), 0);
189
} else if (inet_pton(AF_INET, ip, &sa4.sin_addr)) {
190
sa4.sin_family = AF_INET;
191
192
- if (getnameinfo((struct sockaddr *)&sa4, sizeof(sa4), out, sizeof(out), NULL, 0, NI_NAMEREQD) < 0) {
+ if (getnameinfo((struct sockaddr *)&sa4, sizeof(sa4), out, sizeof(out), NULL, 0, NI_NAMEREQD) != 0) {
193
194
195
0 commit comments