#41347 [NEW]: checkdnsrr() segfaults on empty hostname
| From: | spheroid@php.net | Date: | Thu, 10 May 2007 09:35:01 +0000 |
| Subject: | #41347 [NEW]: checkdnsrr() segfaults on empty hostname | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-112463@lists.php.net to get a copy of this message | ||
From: spheroid@php.net
Operating system: Mac OS X 10.4.9
PHP version: 5.2.2
PHP Bug Type: Network related
Bug description: checkdnsrr() segfaults on empty hostname
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 bug report at http://bugs.php.net/?id=41347&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=41347&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=41347&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=41347&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=41347&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=41347&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=41347&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=41347&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=41347&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=41347&r=support
Expected behavior: http://bugs.php.net/fix.php?id=41347&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=41347&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=41347&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=41347&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=41347&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=41347&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=41347&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=41347&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=41347&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=41347&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=41347&r=mysqlcfg