]> granicus.if.org Git - php/commitdiff
- Fix bug #52101, dns_get_record()garbage in 'ipv6' field
authorPierre Joye <pajoye@php.net>
Thu, 17 Jun 2010 09:26:29 +0000 (09:26 +0000)
committerPierre Joye <pajoye@php.net>
Thu, 17 Jun 2010 09:26:29 +0000 (09:26 +0000)
NEWS
ext/standard/dns_win32.c

diff --git a/NEWS b/NEWS
index 7976569eef2742588d99415f82650a7376e96a97..1584fa38aac5862c3f7d73fc18c6a51feb35ecce 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -74,6 +74,8 @@ PHP                                                                        NEWS
   requests (Fixes CVE-2010-0397, bug #51288). (Raphael Geissert)
 - Fixed 64-bit integer overflow in mhash_keygen_s2k(). (ClĂ©ment LECIGNE, Stas)
 
+- Fixed bug #52101 (dns_get_record() garbage in 'ipv6' field on Windows).
+  (Pierre)
 - Fixed bug #52082 (character_set_client & character_set_connection reset after
   mysqli_change_user()). (Andrey)
 - Fixed bug #52043 (GD doesn't recognize latest libJPEG versions).
index 794912d64137594230989567387b62dd97dbba8b..bd12c4adea49c1cc3e042739c0bc4ed46bad496f 100644 (file)
@@ -274,6 +274,12 @@ static void php_parserr(PDNS_RECORD pRec, int type_to_fetch, int store, zval **s
                                        }
                                }
 
+                               if (have_v6_break && in_v6_break) {
+                                       tp[0] = ':';
+                                       tp++;
+                               }
+                               tp[0] = '\0';
+
                                add_assoc_string(*subarray, "type", "AAAA", 1);
                                add_assoc_string(*subarray, "ipv6", buf, 1);
                        }