From: guy Date: Mon, 18 Apr 2005 00:08:02 +0000 (+0000) Subject: Boost size of buffers so that they can handle a 32-bit integer; from X-Git-Tag: tcpdump-3.9.1~153 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/73d7549e472621db92e26765a4dca61180951e4a Boost size of buffers so that they can handle a 32-bit integer; from OpenBSD. --- diff --git a/print-snmp.c b/print-snmp.c index f88c5799..387a9d5a 100644 --- a/print-snmp.c +++ b/print-snmp.c @@ -58,7 +58,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-snmp.c,v 1.62 2005-01-05 04:05:04 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-snmp.c,v 1.62.2.1 2005-04-18 00:08:02 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -1320,13 +1320,13 @@ snmppdu_print(u_short pduid, const u_char *np, u_int length) if ((pduid == GETREQ || pduid == GETNEXTREQ || pduid == SETREQ || pduid == INFORMREQ || pduid == V2TRAP || pduid == REPORT) && elem.data.integer != 0) { - char errbuf[10]; + char errbuf[20]; printf("[errorStatus(%s)!=0]", DECODE_ErrorStatus(elem.data.integer)); } else if (pduid == GETBULKREQ) { printf(" N=%d", elem.data.integer); } else if (elem.data.integer != 0) { - char errbuf[10]; + char errbuf[20]; printf(" %s", DECODE_ErrorStatus(elem.data.integer)); error = elem.data.integer; } @@ -1415,7 +1415,7 @@ trappdu_print(const u_char *np, u_int length) } generic = elem.data.integer; { - char buf[10]; + char buf[20]; printf(" %s", DECODE_GenericTrap(generic)); } length -= count;