Bug #1251: snmpwalk function causes segfault
| From: | lemming at k332 dot feld dot cvut dot cz | Date: | Sun, 21 Mar 1999 18:09:55 +0000 |
| Subject: | Bug #1251: snmpwalk function causes segfault | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-4707@lists.php.net to get a copy of this message | ||
From: lemming@k332.feld.cvut.cz
Operating system: Linux 2.2.1
PHP version: 3.0.7
PHP Bug Type: Reproduceable crash
Bug description: snmpwalk function causes segfault
Hello.
There is a bug in the snmpwalk() function when used with ucd-snmp
3.6.1. This version of UCD frees the 'community' string on snmp_close(),
but PHP does not malloc this string - it passes pointer to variable.
When following program is ran with PHP 3.0.7 and UCD 3.6.1, it
always crashes:
<?
$a = snmpwalk("localhost","public","system");
?>
BTW: Current implementation of SNMPWALK is useless - it should
return string-indexed array and not just array of values. You need
to know to which variable the value belongs.
Michal Kara alias lemming
--
PHP Development Mailing List http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
For help: php-dev-help@lists.php.net