diff options
author | Hadriel Kaplan <hadrielk@yahoo.com> | 2014-03-27 17:24:20 -0400 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2014-03-27 21:39:57 +0000 |
commit | ca9c160933919a85cd22dfd1784dcc04675fb72a (patch) | |
tree | 05817d85566dd325f3cbf07b5218d37782065e55 /frame_tvbuff.c | |
parent | 9a977fc8d03238f083760205be0d980dccaf3ee7 (diff) | |
download | wireshark-ca9c160933919a85cd22dfd1784dcc04675fb72a.tar.gz wireshark-ca9c160933919a85cd22dfd1784dcc04675fb72a.tar.bz2 wireshark-ca9c160933919a85cd22dfd1784dcc04675fb72a.zip |
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 <hadrielk@yahoo.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'frame_tvbuff.c')
-rw-r--r-- | frame_tvbuff.c | 2 |
1 files changed, 2 insertions, 0 deletions
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)); |