From ca9c160933919a85cd22dfd1784dcc04675fb72a Mon Sep 17 00:00:00 2001 From: Hadriel Kaplan Date: Thu, 27 Mar 2014 17:24:20 -0400 Subject: Fix bug9931 'Encapsulated ethernet packets sometimes show invalid FCS' This fixes part-1 of bug9931: the uninitialized use of a wtap_pkthdr struct. The second part of the bug deals with dissectors calling the Ethernet dissector for ecnapsulated Ethernet packets but using the wrong dissector handle to do so. That's unrelated to the issue this commit addresses, so I'm splitting them up. Change-Id: I87be7b736f82dd74d8c261062f88143372b5344c Reviewed-on: https://code.wireshark.org/review/848 Reviewed-by: Hadriel Kaplan Reviewed-by: Anders Broman --- frame_tvbuff.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'frame_tvbuff.c') diff --git a/frame_tvbuff.c b/frame_tvbuff.c index 74a40e2030..b47d206f07 100644 --- a/frame_tvbuff.c +++ b/frame_tvbuff.c @@ -74,6 +74,8 @@ frame_cache(struct tvb_frame *frame_tvb) { struct wtap_pkthdr phdr; /* Packet header */ + memset(&phdr, 0, sizeof(struct wtap_pkthdr)); + if (frame_tvb->buf == NULL) { frame_tvb->buf = (struct Buffer *) g_malloc(sizeof(struct Buffer)); -- cgit v1.2.1