X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/b2957ddee9bfd6a6bfcd4db7015e706755cecd0e..6191f36146f5d286304e9b6e893477fe509d83ab:/print-snmp.c diff --git a/print-snmp.c b/print-snmp.c index 60ba4d22..728da6be 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.63 2005-04-18 00:07:31 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/tcpdump/print-snmp.c,v 1.64 2005-05-06 07:56:53 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -786,7 +786,10 @@ asn1_print(struct be *elem) p = elem->data.str; if (printable) { putchar('"'); - (void)fn_print(p, p + asnlen); + if (fn_printn(p, asnlen, snapend)) { + putchar('"'); + goto trunc; + } putchar('"'); } else for (i = asnlen; i-- > 0; p++) {