]> The Tcpdump Group git mirrors - tcpdump/commitdiff
From Chris Larson: don't cut off the last byte of the chunk payload.
authorguy <guy>
Thu, 13 Sep 2007 18:03:49 +0000 (18:03 +0000)
committerguy <guy>
Thu, 13 Sep 2007 18:03:49 +0000 (18:03 +0000)
CREDITS
print-sctp.c

diff --git a/CREDITS b/CREDITS
index 1f62ade630822c77de9379769cdbff6bc43c87c4..12878c5e3e3b7f58a3f533d86f91d3c2557ff938 100644 (file)
--- a/CREDITS
+++ b/CREDITS
@@ -35,6 +35,7 @@ Additional people who have contributed patches:
        Chris Cogdon                    <[email protected]>
        Chris G. Demetriou              <[email protected]>
        Chris Jepeway                   <[email protected]>
+       Chris Larson                    <[email protected]>
        Craig Rodrigues                 <[email protected]>
        Crist J. Clark                  <[email protected]>
        Daniel Hagerty                  <[email protected]>
index d38cfde2d6755ddcb276b621346ddbbb2a0c4bc4..05c753a52e6cf892953ebbfc60ce1b207e58327a 100644 (file)
@@ -35,7 +35,7 @@
 
 #ifndef lint
 static const char rcsid[] _U_ =
-"@(#) $Header: /tcpdump/master/tcpdump/print-sctp.c,v 1.20 2005-07-07 01:22:20 guy Exp $ (NETLAB/PEL)";
+"@(#) $Header: /tcpdump/master/tcpdump/print-sctp.c,v 1.21 2007-09-13 18:03:49 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("]");
              }