From 1f37b9f52909fc0e5be25fa19aa43df43781b94e Mon Sep 17 00:00:00 2001 From: Francois-Xavier Le Bail Date: Tue, 29 May 2018 18:26:14 +0200 Subject: [PATCH] DCCP: Fix a truncation message It's a truncated packet, not sure it's invalid. --- print-dccp.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/print-dccp.c b/print-dccp.c index 407ec2dd..af47d60e 100644 --- a/print-dccp.c +++ b/print-dccp.c @@ -294,10 +294,8 @@ dccp_print(netdissect_options *ndo, const u_char *bp, const u_char *data2, /* make sure we have enough data to look at the X bit */ cp = (const u_char *)(dh + 1); - if (cp > ndo->ndo_snapend) { - ND_PRINT("[Invalid packet|dccp]"); - return; - } + if (cp > ndo->ndo_snapend) + goto trunc; if (len < sizeof(struct dccp_hdr)) { ND_PRINT("truncated-dccp - %u bytes missing!", len - (u_int)sizeof(struct dccp_hdr)); -- 2.39.5