|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #52101 dns_get_record() - garbage in 'ipv6' field
Submitted: 2010-06-16 18:29 UTC Modified: 2010-06-17 11:27 UTC
From: grawity at gmail dot com Assigned: pajoye (profile)
Status: Closed Package: Network related
PHP Version: 5.3.2 OS: Windows XP SP3
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: grawity at gmail dot com
New email:
PHP Version: OS:


 [2010-06-16 18:29 UTC] grawity at gmail dot com
When calling dns_get_record($host, DNS_AAAA) for a single specific hostname (""), random garbage is appended to the 'ipv6' field of the DNS response.

The DNS response itself is valid (tested using Wireshark).

<tshark-output filter="udp port 53"> ->      DNS Standard query AAAA -> DNS Standard query response AAAA 2001:470:1f0b:614:2ff:76ff:fe90:0

PHP 5.3.2 (cli) (built: Mar  3 2010 20:47:01)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies

Test script:
foreach (dns_get_record('', DNS_AAAA) as $r)

Expected result:
string(33) "2001:470:1f0b:614:2ff:76ff:fe90::"

Actual result:
string(37) "2001:470:1f0b:614:2ff:76ff:fe90:XXXXX"

(where XXXXX is five random bytes)


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-06-16 19:21 UTC]
-Status: Open +Status: Assigned -Assigned To: +Assigned To: pajoye
 [2010-06-17 02:14 UTC]
On linux I got:
string(33) "2001:470:1f0b:614:2ff:76ff:fe90::"
 [2010-06-17 11:26 UTC]
Automatic comment from SVN on behalf of pajoye
Log: - Fix bug #52101, dns_get_record()garbage in 'ipv6' field
 [2010-06-17 11:27 UTC]
-Status: Assigned +Status: Closed
 [2010-06-17 11:27 UTC]
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Feb 21 03:01:33 2024 UTC