From:             
Operating system: Windows XP SP3
PHP version:      5.3.2
Package:          Network related
Bug Type:         Bug
Bug description:dns_get_record() - garbage in 'ipv6' field

Description:
------------
When calling dns_get_record($host, DNS_AAAA) for a single specific hostname
("snowflake.nullroute.eu.org"), 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">

192.168.1.94 -> 8.8.8.8      DNS Standard query AAAA
snowflake.nullroute.eu.org

     8.8.8.8 -> 192.168.1.94 DNS Standard query response AAAA
2001:470:1f0b:614:2ff:76ff:fe90:0

</tshark-output>



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:
---------------
<?php

foreach (dns_get_record('snowflake.nullroute.eu.org', DNS_AAAA) as $r)

    var_dump($r['ipv6']);



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)

-- 
Edit bug report at http://bugs.php.net/bug.php?id=52101&edit=1
-- 
Try a snapshot (PHP 5.2):            
http://bugs.php.net/fix.php?id=52101&r=trysnapshot52
Try a snapshot (PHP 5.3):            
http://bugs.php.net/fix.php?id=52101&r=trysnapshot53
Try a snapshot (trunk):              
http://bugs.php.net/fix.php?id=52101&r=trysnapshottrunk
Fixed in SVN:                        
http://bugs.php.net/fix.php?id=52101&r=fixed
Fixed in SVN and need be documented: 
http://bugs.php.net/fix.php?id=52101&r=needdocs
Fixed in release:                    
http://bugs.php.net/fix.php?id=52101&r=alreadyfixed
Need backtrace:                      
http://bugs.php.net/fix.php?id=52101&r=needtrace
Need Reproduce Script:               
http://bugs.php.net/fix.php?id=52101&r=needscript
Try newer version:                   
http://bugs.php.net/fix.php?id=52101&r=oldversion
Not developer issue:                 
http://bugs.php.net/fix.php?id=52101&r=support
Expected behavior:                   
http://bugs.php.net/fix.php?id=52101&r=notwrong
Not enough info:                     
http://bugs.php.net/fix.php?id=52101&r=notenoughinfo
Submitted twice:                     
http://bugs.php.net/fix.php?id=52101&r=submittedtwice
register_globals:                    
http://bugs.php.net/fix.php?id=52101&r=globals
PHP 4 support discontinued:          http://bugs.php.net/fix.php?id=52101&r=php4
Daylight Savings:                    http://bugs.php.net/fix.php?id=52101&r=dst
IIS Stability:                       
http://bugs.php.net/fix.php?id=52101&r=isapi
Install GNU Sed:                     
http://bugs.php.net/fix.php?id=52101&r=gnused
Floating point limitations:          
http://bugs.php.net/fix.php?id=52101&r=float
No Zend Extensions:                  
http://bugs.php.net/fix.php?id=52101&r=nozend
MySQL Configuration Error:           
http://bugs.php.net/fix.php?id=52101&r=mysqlcfg

Reply via email to