]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-sip.c
Mark the TCP header structure as unaligned.
[tcpdump] / print-sip.c
index 48562f8c38bca066ee91b0e8152492e79c53d7c7..a0223f221bb407bb26e904621c219cfc808270a0 100644 (file)
  * Original code by Hannes Gredler ([email protected])
  */
 
-#ifndef lint
-static const char rcsid[] _U_ =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-sip.c,v 1.1 2004-07-27 17:04:20 hannes Exp $";
-#endif
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -44,6 +39,7 @@ sip_print(register const u_char *pptr, register u_int len)
         return;
 
     for (idx = 0; idx < len; idx++) {
+        TCHECK2(*(pptr+idx), 2);
         if (EXTRACT_16BITS(pptr+idx) != 0x0d0a) { /* linefeed ? */
             safeputchar(*(pptr+idx));
         } else {
@@ -54,7 +50,10 @@ sip_print(register const u_char *pptr, register u_int len)
 
     /* do we want to see an additionally hexdump ? */
     if (vflag> 1)
-        print_unknown_data(pptr,"\n\t",len);
+        print_unknown_data(gndo,pptr,"\n\t",len);
 
     return;
+
+trunc:
+    printf("[|sip]");
 }