]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Boost size of buffers so that they can handle a 32-bit integer; from
authorguy <guy>
Mon, 18 Apr 2005 00:07:31 +0000 (00:07 +0000)
committerguy <guy>
Mon, 18 Apr 2005 00:07:31 +0000 (00:07 +0000)
OpenBSD.

print-snmp.c

index f88c57994c224c736e3a39495a4b959d63d9b6b8..60ba4d22507c3931de72f846d91e34d4e853c02b 100644 (file)
@@ -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.63 2005-04-18 00:07:31 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;