From Chris Larson: don't cut off the last byte of the chunk payload.
authorguy <guy>
Thu, 13 Sep 2007 18:04:58 +0000 (18:04 +0000)
committerguy <guy>
Thu, 13 Sep 2007 18:04:58 +0000 (18:04 +0000)
CREDITS
print-sctp.c

diff --git a/CREDITS b/CREDITS
index c5695cb96823942e84b4d759a76d6684985c42c1..470c2ab4a31d009025cde500550c148a1e64b23f 100644 (file)
--- 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>
index 360aad21c3c9f84ee4e975ad833cce3e427ce698..a7ac27be483b414ae3cf727e9329bebd1267cbd9 100644 (file)
@@ -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("]");
              }