diff options
author | Guy Harris <guy@alum.mit.edu> | 1999-12-10 21:00:53 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 1999-12-10 21:00:53 +0000 |
commit | d300a2bb04ae0795739583930c332cc41cd6e2db (patch) | |
tree | 499176174c5a9779cfa74b3cd7c89af8b73ea638 /packet-snmp.c | |
parent | 81c1c2b1198e3e12d77615a8fc09e7d36ccb8220 (diff) |
Don't use MAX_NAME_LEN*6 for string buffers, define our own
MAX_STRING_LEN and use that.
svn path=/trunk/; revision=1286
Diffstat (limited to 'packet-snmp.c')
-rw-r--r-- | packet-snmp.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/packet-snmp.c b/packet-snmp.c index af3333b7c5..369f3995c0 100644 --- a/packet-snmp.c +++ b/packet-snmp.c @@ -2,7 +2,7 @@ * Routines for SNMP (simple network management protocol) * D.Jorand (c) 1998 * - * $Id: packet-snmp.c,v 1.17 1999/12/10 20:45:37 guy Exp $ + * $Id: packet-snmp.c,v 1.18 1999/12/10 21:00:53 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@unicom.net> @@ -85,6 +85,8 @@ #undef SNMP_TRAP_ENTERPRISESPECIFIC #endif +#define MAX_STRING_LEN 1024 /* TBC */ + #include <glib.h> #include "packet.h" #include "asn1.h" @@ -386,7 +388,7 @@ snmp_variable_decode(proto_tree *snmp_tree, ASN1_SCK *asn1, int offset, guint32 vb_uinteger_value; guint8 *vb_octet_string; - gchar vb_string[MAX_NAME_LEN*6]; /* TBC */ + gchar vb_string[MAX_STRING_LEN]; /* TBC */ subid_t *vb_oid; guint vb_oid_length; @@ -582,7 +584,7 @@ dissect_snmp_pdu(const u_char *pd, int offset, frame_data *fd, guint timestamp; guint timestamp_length; - gchar oid_string[MAX_NAME_LEN*6]; /* TBC */ + gchar oid_string[MAX_STRING_LEN]; /* TBC */ guint variable_bindings_length; @@ -590,7 +592,9 @@ dissect_snmp_pdu(const u_char *pd, int offset, frame_data *fd, guint variable_length; subid_t *variable_oid; guint variable_oid_length; - gchar vb_oid_string[MAX_NAME_LEN*6]; /* TBC */ +#if defined(HAVE_UCD_SNMP_SNMP_H) || defined(HAVE_SNMP_SNMP_H) + gchar vb_oid_string[MAX_STRING_LEN]; /* TBC */ +#endif proto_tree *snmp_tree = NULL; proto_item *item = NULL; |