]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-loopback.c
Add a malloc/free process with garbage collector
[tcpdump] / print-loopback.c
index e0c6efbdfc295a100aa75d0d836b4f0a256b0cf7..46942c94d7190a73ee00ec9c78b5b0cef9e2e6ba 100644 (file)
@@ -56,7 +56,7 @@ static const struct tok fcode_str[] = {
 static void
 loopback_message_print(netdissect_options *ndo, const u_char *cp, const u_int len)
 {
-       const u_char *ep = cp + len;
+       const u_char *ep = ndo->ndo_snapend;
        uint16_t function;
 
        if (len < 2)
@@ -107,7 +107,7 @@ trunc:
 void
 loopback_print(netdissect_options *ndo, const u_char *cp, const u_int len)
 {
-       const u_char *ep = cp + len;
+       const u_char *ep = ndo->ndo_snapend;
        uint16_t skipCount;
 
        ND_PRINT("Loopback");