From 49418ce7da0e1f60bf449e4c4f516a87409d3aeb Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Thu, 17 Jun 2010 09:26:29 +0000 Subject: [PATCH] - Fix bug #52101, dns_get_record()garbage in 'ipv6' field --- NEWS | 2 ++ ext/standard/dns_win32.c | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/NEWS b/NEWS index 7976569eef..1584fa38aa 100644 --- 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). diff --git a/ext/standard/dns_win32.c b/ext/standard/dns_win32.c index 794912d641..bd12c4adea 100644 --- a/ext/standard/dns_win32.c +++ b/ext/standard/dns_win32.c @@ -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); } -- 2.40.0