]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-telnet.c
Use more the EXTRACT_U_1() macro (43/n)
[tcpdump] / print-telnet.c
index e3782177a9f4c0534bb3759030479cf37ec51e74..8ff527b4849d1ca02b4fe7f00f48c8bc3815aa39 100644 (file)
@@ -439,7 +439,7 @@ telnet_parse(netdissect_options *ndo, const u_char *sp, u_int length, int print)
                p = sp;
                while (length > (u_int)(p + 1 - sp)) {
                        ND_TCHECK_2(p);
-                       if (p[0] == IAC && p[1] == SE)
+                       if (EXTRACT_U_1(p) == IAC && EXTRACT_U_1(p + 1) == SE)
                                break;
                        p++;
                }