#31772 [Com]: Net-SNMP 5.2.x ++ Workaround in PHP_SNMP Incorrectly Coded

From: Date: Tue, 01 Feb 2005 02:17:58 +0000
Subject: #31772 [Com]: Net-SNMP 5.2.x ++ Workaround in PHP_SNMP Incorrectly Coded
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-73167@lists.php.net to get a copy of this message
ID: 31772 Comment by: larryjadams at comcast dot net Reported By: LarryJAdams at comcast dot net Status: Open Bug Type: *Compile Issues Operating System: Win32 PHP Version: 5.0.3 New Comment: I have submitted fixes for the following PHP CVS Branches: PHP 4.3.x PHP 5.0.x PHP 5.1.x The fix also included the snmpv2 feature set. I hope you all enjoy it as much as I will. Larry Previous Comments: ------------------------------------------------------------------------ [2005-01-31 01:05:46] LarryJAdams at comcast dot net 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 this bug report at http://bugs.php.net/?id=31772&edit=1

« previous php.bugs (#73167) next »