]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-telnet.c
Use more ND_TCHECK_n()/ND_TTEST_n() macros
[tcpdump] / print-telnet.c
index 10fad9fef7f6a5b8c9a045c8f59eeeccb0873829..fe461bafd6651c1a07672f0e66d2bc34fb7662b2 100644 (file)
@@ -56,6 +56,7 @@
 #include <stdio.h>
 
 #include "netdissect.h"
+#include "extract.h"
 
 static const char tstr[] = " [|telnet]";
 
@@ -437,7 +438,7 @@ telnet_parse(netdissect_options *ndo, const u_char *sp, u_int length, int print)
                /* IAC SB .... IAC SE */
                p = sp;
                while (length > (u_int)(p + 1 - sp)) {
-                       ND_TCHECK2(*p, 2);
+                       ND_TCHECK_2(p);
                        if (p[0] == IAC && p[1] == SE)
                                break;
                        p++;