ID: 32720
User updated by: joropito at ciudad dot com dot ar
Reported By: joropito at ciudad dot com dot ar
Status: Open
Bug Type: SNMP related
Operating System: FreeBSD 5.3 SPARC64
PHP Version: 5.0.4
New Comment:
Here's a patch. It would be nice to be added in CVS snapshots and next
release.
--- ext/snmp.orig/snmp.c Fri Apr 15 15:07:20 2005
+++ ext/snmp/snmp.c Fri Apr 15 13:33:57 2005
@@ -352,9 +352,9 @@
struct snmp_pdu *pdu=NULL, *response;
struct variable_list *vars;
oid name[MAX_NAME_LEN];
- int name_length;
+ size_t name_length;
oid root[MAX_NAME_LEN];
- int rootlen = 0;
+ size_t rootlen = 0;
int gotroot = 0;
int status, count;
char buf[2048];
Previous Comments:
------------------------------------------------------------------------
[2005-04-15 16:25:41] joropito at ciudad dot com dot ar
Description:
------------
In php_snmp_internal() (snmp.c) its defined
int name_length; // length 4
int rootlen = 0; // length 4
but to be architecture portable it needs to be
size_t name_length; // length 8 on sparc64
size_t rootlen = 0; //length 8 on sparc64
like ucd/net-snmp defines at snmp_parse_oid()
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=32720&edit=1