#41347 [NoF->Csd]: checkdnsrr() segfaults on empty hostname
ID: 41347
Updated by: spheroid@php.net
Reported By: spheroid@php.net
-Status: No Feedback
+Status: Closed
Bug Type: Network related
Operating System: Mac OS X 10.4.9
PHP Version: 5.2.2
New Comment:
Works with 5.2.3-dev.
Previous Comments:
------------------------------------------------------------------------
[2007-05-18 01:00:01] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
------------------------------------------------------------------------
[2007-05-10 13:17:50] scottmac@php.net
Please try using this CVS snapshot:
http://snaps.php.net/php5.2-latest.tar.gz
For Windows:
http://snaps.php.net/win32/php5.2-win32-latest.zip
------------------------------------------------------------------------
[2007-05-10 12:18:49] scottmac@php.net
Can you try the patch at
http://server.macvicar.net/downloads/php/bug41347.patch.txt
Also does dns_get_mx segfault too?
------------------------------------------------------------------------
[2007-05-10 09:35:01] spheroid@php.net
Description:
------------
checkdnsrr() should return FALSE on error, but it segfaults if host
argument is an empty string.
Reproduce code:
---------------
php -r 'var_dump(checkdnsrr("", "A"));'
Expected result:
----------------
bool(false)
Actual result:
--------------
zsh: bus error php -r 'var_dump(checkdnsrr("", "A"));'
---
(gdb) run -r 'var_dump(checkdnsrr("", "A"));'
Starting program: /usr/local/bin/php -r 'var_dump(checkdnsrr("",
"A"));'
Reading symbols for shared libraries .+++..+++++..++++.. done
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00000000
0x901174ed in res_send ()
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=41347&edit=1
Thread (4 messages)