]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Telnet: Use more the EXTRACT_U_1() macro
authorFrancois-Xavier Le Bail <[email protected]>
Tue, 9 Jan 2018 13:53:27 +0000 (14:53 +0100)
committerFrancois-Xavier Le Bail <[email protected]>
Tue, 9 Jan 2018 13:53:27 +0000 (14:53 +0100)
print-telnet.c

index f0604054f4e7b6d34d264f2be1f65142e1150475..a9a517a0c299316c736a28c1c0e8b29f23d092a1 100644 (file)
@@ -398,7 +398,8 @@ telnet_parse(netdissect_options *ndo, const u_char *sp, u_int length, int print)
                if (length < 1) \
                        goto pktend; \
                ND_TCHECK_1(sp); \
                if (length < 1) \
                        goto pktend; \
                ND_TCHECK_1(sp); \
-               c = *sp++; \
+               c = EXTRACT_U_1(sp); \
+               sp++; \
                length--; \
        } while (0)
 
                length--; \
        } while (0)