From: LarryJAdams at comcast dot net
Operating system: Win32
PHP version: 5.0.3
PHP Bug Type: *Compile Issues
Bug description: Net-SNMP 5.2.x ++ Workaround in PHP_SNMP Incorrectly Coded
Description:
------------
The following code in snmp.c from lines: 794 through 831 is not valid. If
both HAVE_AES and SNMP_VALIDATE_ERR are defined, the ifdef's will not
function properly. Please review the code below.
Reproduce code:
---------------
Incorrect code (starting on 810):
"* symbol on purpose, as it's defined to be the same as the former.
*/
|| !strcasecmp(prot, "AES")) {
#else
) {
s->securityPrivProto = usmAES128PrivProtocol;
s->securityPrivProtoLen =
OIDSIZE(usmAES128PrivProtocol);
return (0);"
Correct Code (starting on 810):
"* symbol on purpose, as it's defined to be the same as the former.
*/
|| !strcasecmp(prot, "AES")) {
s->securityPrivProto = usmAES128PrivProtocol;
s->securityPrivProtoLen =
OIDSIZE(usmAES128PrivProtocol);
return (0);
#else
) {
s->securityPrivProto = usmAES128PrivProtocol;
s->securityPrivProtoLen =
OIDSIZE(usmAES128PrivProtocol);
return (0);"
Expected result:
----------------
N/A. Please review code snippet.
Actual result:
--------------
N/A. Please review code snippet.
--
Edit bug report at http://bugs.php.net/?id=31772&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31772&r=trysnapshot4
Try a CVS snapshot (php5.0):
http://bugs.php.net/fix.php?id=31772&r=trysnapshot50
Try a CVS snapshot (php5.1):
http://bugs.php.net/fix.php?id=31772&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=31772&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=31772&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=31772&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=31772&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=31772&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=31772&r=support
Expected behavior: http://bugs.php.net/fix.php?id=31772&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=31772&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=31772&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=31772&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31772&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=31772&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=31772&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=31772&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=31772&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=31772&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=31772&r=mysqlcfg