]> The Tcpdump Group git mirrors - tcpdump/commitdiff
add boundary check for CLNP segment header
authorhannes <hannes>
Mon, 11 Jul 2005 13:20:35 +0000 (13:20 +0000)
committerhannes <hannes>
Mon, 11 Jul 2005 13:20:35 +0000 (13:20 +0000)
print-isoclns.c

index 39ddcd188179ab350e55561178841ede2483b8f3..7b1acda2dd36de973859c232fd0b3484605b3784 100644 (file)
@@ -26,7 +26,7 @@
 
 #ifndef lint
 static const char rcsid[] _U_ =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-isoclns.c,v 1.133.2.13 2005-07-07 01:26:01 guy Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/print-isoclns.c,v 1.133.2.14 2005-07-11 13:20:35 hannes Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -780,6 +780,7 @@ static int clnp_print (const u_int8_t *pptr, u_int length)
 
         if (clnp_flags & CLNP_SEGMENT_PART) {
                clnp_segment_header = (const struct clnp_segment_header_t *) pptr;
+                TCHECK(*clnp_segment_header);
                 printf("\n\tData Unit ID: 0x%04x, Segment Offset: %u, Total PDU Length: %u",
                        EXTRACT_16BITS(clnp_segment_header->data_unit_id),
                        EXTRACT_16BITS(clnp_segment_header->segment_offset),