From owner-svn-src-head@FreeBSD.ORG Wed Dec 28 05:58:31 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7BC8C106566B; Wed, 28 Dec 2011 05:58:31 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 679F58FC08; Wed, 28 Dec 2011 05:58:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBS5wVA3085643; Wed, 28 Dec 2011 05:58:31 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBS5wVnJ085636; Wed, 28 Dec 2011 05:58:31 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201112280558.pBS5wVnJ085636@svn.freebsd.org> From: Kevin Lo Date: Wed, 28 Dec 2011 05:58:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228926 - head/contrib/tcpdump X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Dec 2011 05:58:31 -0000 Author: kevlo Date: Wed Dec 28 05:58:31 2011 New Revision: 228926 URL: http://svn.freebsd.org/changeset/base/228926 Log: Fix incorrect uses of sizeof(). The details of the fix can be found in the tcpdump git repository: commit 684955d58611ee94eccdc34e82b32e676337188c Modified: head/contrib/tcpdump/print-eigrp.c head/contrib/tcpdump/print-ldp.c head/contrib/tcpdump/print-lmp.c head/contrib/tcpdump/print-lspping.c head/contrib/tcpdump/print-rsvp.c head/contrib/tcpdump/print-slow.c Modified: head/contrib/tcpdump/print-eigrp.c ============================================================================== --- head/contrib/tcpdump/print-eigrp.c Wed Dec 28 05:57:03 2011 (r228925) +++ head/contrib/tcpdump/print-eigrp.c Wed Dec 28 05:58:31 2011 (r228926) @@ -280,7 +280,7 @@ eigrp_print(register const u_char *pptr, if (eigrp_tlv_len < sizeof(struct eigrp_tlv_header) || eigrp_tlv_len > tlen) { - print_unknown_data(tptr+sizeof(sizeof(struct eigrp_tlv_header)),"\n\t ",tlen); + print_unknown_data(tptr+sizeof(struct eigrp_tlv_header),"\n\t ",tlen); return; } @@ -468,7 +468,7 @@ eigrp_print(register const u_char *pptr, } /* do we want to see an additionally hexdump ? */ if (vflag > 1) - print_unknown_data(tptr+sizeof(sizeof(struct eigrp_tlv_header)),"\n\t ", + print_unknown_data(tptr+sizeof(struct eigrp_tlv_header),"\n\t ", eigrp_tlv_len-sizeof(struct eigrp_tlv_header)); tptr+=eigrp_tlv_len; Modified: head/contrib/tcpdump/print-ldp.c ============================================================================== --- head/contrib/tcpdump/print-ldp.c Wed Dec 28 05:57:03 2011 (r228925) +++ head/contrib/tcpdump/print-ldp.c Wed Dec 28 05:58:31 2011 (r228926) @@ -609,7 +609,7 @@ ldp_msg_print(register const u_char *ppt } /* do we want to see an additionally hexdump ? */ if (vflag > 1 || hexdump==TRUE) - print_unknown_data(tptr+sizeof(sizeof(struct ldp_msg_header)),"\n\t ", + print_unknown_data(tptr+sizeof(struct ldp_msg_header),"\n\t ", msg_len); tptr += msg_len+4; Modified: head/contrib/tcpdump/print-lmp.c ============================================================================== --- head/contrib/tcpdump/print-lmp.c Wed Dec 28 05:57:03 2011 (r228925) +++ head/contrib/tcpdump/print-lmp.c Wed Dec 28 05:58:31 2011 (r228926) @@ -871,7 +871,7 @@ lmp_print(register const u_char *pptr, r } /* do we want to see an additionally hexdump ? */ if (vflag > 1 || hexdump==TRUE) - print_unknown_data(tptr+sizeof(sizeof(struct lmp_object_header)),"\n\t ", + print_unknown_data(tptr+sizeof(struct lmp_object_header),"\n\t ", lmp_obj_len-sizeof(struct lmp_object_header)); tptr+=lmp_obj_len; Modified: head/contrib/tcpdump/print-lspping.c ============================================================================== --- head/contrib/tcpdump/print-lspping.c Wed Dec 28 05:57:03 2011 (r228925) +++ head/contrib/tcpdump/print-lspping.c Wed Dec 28 05:58:31 2011 (r228926) @@ -878,7 +878,7 @@ lspping_print(register const u_char *ppt } /* do we want to see an additionally tlv hexdump ? */ if (vflag > 1 || tlv_hexdump==TRUE) - print_unknown_data(tptr+sizeof(sizeof(struct lspping_tlv_header)),"\n\t ", + print_unknown_data(tptr+sizeof(struct lspping_tlv_header),"\n\t ", lspping_tlv_len); Modified: head/contrib/tcpdump/print-rsvp.c ============================================================================== --- head/contrib/tcpdump/print-rsvp.c Wed Dec 28 05:57:03 2011 (r228925) +++ head/contrib/tcpdump/print-rsvp.c Wed Dec 28 05:58:31 2011 (r228926) @@ -1790,7 +1790,7 @@ _U_ } /* do we also want to see a hex dump ? */ if (vflag > 1 || hexdump==TRUE) - print_unknown_data(tptr+sizeof(sizeof(struct rsvp_object_header)),"\n\t ", /* FIXME indentation */ + print_unknown_data(tptr+sizeof(struct rsvp_object_header),"\n\t ", /* FIXME indentation */ rsvp_obj_len-sizeof(struct rsvp_object_header)); tptr+=rsvp_obj_len; Modified: head/contrib/tcpdump/print-slow.c ============================================================================== --- head/contrib/tcpdump/print-slow.c Wed Dec 28 05:57:03 2011 (r228925) +++ head/contrib/tcpdump/print-slow.c Wed Dec 28 05:58:31 2011 (r228926) @@ -368,7 +368,7 @@ void slow_marker_lacp_print(register con tlv_header->type != LACP_TLV_TERMINATOR && tlv_header->type != MARKER_TLV_TERMINATOR) { printf("\n\t-----trailing data-----"); - print_unknown_data(tptr+sizeof(sizeof(struct tlv_header_t)),"\n\t ",tlen); + print_unknown_data(tptr+sizeof(struct tlv_header_t),"\n\t ",tlen); return; } @@ -441,7 +441,7 @@ void slow_marker_lacp_print(register con } /* do we want to see an additional hexdump ? */ if (vflag > 1) { - print_unknown_data(tptr+sizeof(sizeof(struct tlv_header_t)),"\n\t ", + print_unknown_data(tptr+sizeof(struct tlv_header_t),"\n\t ", tlv_len-sizeof(struct tlv_header_t)); }