]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-snmp.c
PIM: Fix some length checks
[tcpdump] / print-snmp.c
index 6058294b59759138f1fe0075eedb082f956d13c2..03e5c3b415ab63770c6883f61b32734c4edaf650 100644 (file)
@@ -71,6 +71,8 @@
 #include <smi.h>
 #endif
 
+#include "netdissect-ctype.h"
+
 #include "netdissect.h"
 #include "extract.h"
 
@@ -700,7 +702,7 @@ asn1_print_string(netdissect_options *ndo, struct be *elem)
        p = elem->data.str;
        ND_TCHECK_LEN(p, asnlen);
        for (i = asnlen; printable && i != 0; p++, i--)
-               printable = ND_ISPRINT(GET_U_1(p));
+               printable = ND_ASCII_ISPRINT(GET_U_1(p));
        p = elem->data.str;
        if (printable) {
                ND_PRINT("\"");