summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorguy <guy>2007-09-13 18:04:58 +0000
committerguy <guy>2007-09-13 18:04:58 +0000
commitc6149525452b982ebbf8cd40262d5f88c6a10832 (patch)
tree0d01d2348f6321350ddfc50e9cd6450c3b8c0bef
parent6decbcad4810a77c8354860f30cd42f122cabf48 (diff)
downloadtcpdump-c6149525452b982ebbf8cd40262d5f88c6a10832.tar.gz
From Chris Larson: don't cut off the last byte of the chunk payload.
-rw-r--r--CREDITS1
-rw-r--r--print-sctp.c5
2 files changed, 4 insertions, 2 deletions
diff --git a/CREDITS b/CREDITS
index c5695cb9..470c2ab4 100644
--- a/CREDITS
+++ b/CREDITS
@@ -33,6 +33,7 @@ Additional people who have contributed patches:
Chris Cogdon <chris@cogdon.org>
Chris G. Demetriou <cgd@netbsd.org>
Chris Jepeway <jepeway@blasted-heath.com>
+ Chris Larson <clarson@kergoth.com>
Craig Rodrigues <rodrigc@mediaone.net>
Crist J. Clark <cjclark@alum.mit.edu>
Daniel Hagerty <hag@ai.mit.edu>
diff --git a/print-sctp.c b/print-sctp.c
index 360aad21..a7ac27be 100644
--- a/print-sctp.c
+++ b/print-sctp.c
@@ -35,7 +35,7 @@
#ifndef lint
static const char rcsid[] _U_ =
-"@(#) $Header: /tcpdump/master/tcpdump/print-sctp.c,v 1.16.2.4 2005-07-07 01:24:38 guy Exp $ (NETLAB/PEL)";
+"@(#) $Header: /tcpdump/master/tcpdump/print-sctp.c,v 1.16.2.5 2007-09-13 18:04:58 guy Exp $ (NETLAB/PEL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -206,6 +206,7 @@ void sctp_print(const u_char *bp, /* beginning of sctp packet */
if (htons(chunkDescPtr->chunkLength) <
sizeof(struct sctpDataPart)+
sizeof(struct sctpChunkDesc)+1) {
+ /* Less than 1 byte of chunk payload */
printf("bogus chunk length %u]",
htons(chunkDescPtr->chunkLength));
return;
@@ -213,7 +214,7 @@ void sctp_print(const u_char *bp, /* beginning of sctp packet */
default_print(payloadPtr,
htons(chunkDescPtr->chunkLength) -
(sizeof(struct sctpDataPart)+
- sizeof(struct sctpChunkDesc)+1));
+ sizeof(struct sctpChunkDesc)));
} else
printf("]");
}