#20494 [NEW]: Empty response gives wrong answer

From: Date: Tue, 19 Nov 2002 14:59:15 +0000
Subject: #20494 [NEW]: Empty response gives wrong answer
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-25265@lists.php.net to get a copy of this message
From: kpesio@saunalahti.fi Operating system: RedHat 7.3 PHP version: 4.2.3 PHP Bug Type: SNMP related Bug description: Empty response gives wrong answer ucd-snmp-4.2.6 & PHP-4.2.3 & Cisco2900xl switch Example code: $uptime = snmpget("x.x.x.x", "public", "system.sysUpTime.0"); $ct = snmpget("x.x.x.x", "public", "system.sysContact.0"); echo ">System UpTime : $uptime<br>System Contact :$ct"; If sysContact is not set in Cisco (null string) the sysUpTime would be copied into $ct. Same effect if using snmpwalk. Fixed by adding into ext/snmp/snmp.c (v1.56) at line 307: retry: /* clear buffers */ buf[0]=(char)0; buf2[0]=(char)0; -- Edit bug report at http://bugs.php.net/?id=20494&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=20494&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=20494&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=20494&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=20494&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=20494&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=20494&r=support Expected behavior: http://bugs.php.net/fix.php?id=20494&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=20494&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=20494&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=20494&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=20494&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=20494&r=dst IIS Stability: http://bugs.php.net/fix.php?id=20494&r=isapi

« previous php.bugs (#25265) next »