]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-sctp.c
Pointers into packet data should usually be pointers to unsigned 1-byte
[tcpdump] / print-sctp.c
index a491481bd21b0e2fd3cf254c58968842113133a2..d38cfde2d6755ddcb276b621346ddbbb2a0c4bc4 100644 (file)
@@ -35,7 +35,7 @@
 
 #ifndef lint
 static const char rcsid[] _U_ =
-"@(#) $Header: /tcpdump/master/tcpdump/print-sctp.c,v 1.18 2005-05-05 23:08:43 guy Exp $ (NETLAB/PEL)";
+"@(#) $Header: /tcpdump/master/tcpdump/print-sctp.c,v 1.20 2005-07-07 01:22:20 guy Exp $ (NETLAB/PEL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -146,7 +146,7 @@ void sctp_print(const u_char *bp,        /* beginning of sctp packet */
        break;
       }
 
-      TCHECK2(*(((u_int8_t *)chunkDescPtr) + chunkLength), chunkLength);
+      TCHECK2(*((u_int8_t *)chunkDescPtr), chunkLength);
       chunkEnd = ((const u_char*)chunkDescPtr + chunkLength);
 
       align=chunkLength % 4;
@@ -200,7 +200,7 @@ void sctp_print(const u_char *bp,        /* beginning of sctp packet */
 
                printf("[Payload");
 
-               if (!xflag && !qflag) {
+               if (!suppress_default_print) {
                        payloadPtr = (const u_char *) (++dataHdrPtr);
                        printf(":");
                        if (htons(chunkDescPtr->chunkLength) <