diff options
author | Stig Bjørlykke <stig@bjorlykke.org> | 2016-03-11 18:42:49 +0100 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2016-06-15 17:56:21 +0000 |
commit | ec5acbc33cfc8e6c82706574814d7232b26112c0 (patch) | |
tree | adf82c24c681e9df037a33df5530b06ba483b25c /wiretap/wtap_opttypes.c | |
parent | 9ba9a05ef06a6869c2ad2970cffa0d9177c04fdd (diff) | |
download | wireshark-ec5acbc33cfc8e6c82706574814d7232b26112c0.tar.gz |
wtap: Make default_filter static
Address of stack memory associated with local variable 'default_filter'
is still referred to by the global variable 'filter_option' upon returning
to the caller. This will be a dangling reference.
Change-Id: I6160a37f05b8aea245b723ec50803e4062886738
Reviewed-on: https://code.wireshark.org/review/14427
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'wiretap/wtap_opttypes.c')
-rw-r--r-- | wiretap/wtap_opttypes.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/wiretap/wtap_opttypes.c b/wiretap/wtap_opttypes.c index 296a6fb29d..f42aa26250 100644 --- a/wiretap/wtap_opttypes.c +++ b/wiretap/wtap_opttypes.c @@ -610,8 +610,7 @@ static void idb_create(wtap_optionblock_t block) static wtap_optblock_reg_t os_option = {"os", "Operating System", WTAP_OPTTYPE_STRING, {0}, {0}}; static wtap_optblock_reg_t fcslen_option = {"fcslen", "FCS Length", WTAP_OPTTYPE_UINT8, {0}, {0}}; - wtapng_if_descr_filter_t default_filter; - memset(&default_filter, 0, sizeof(default_filter)); + static wtapng_if_descr_filter_t default_filter; block->mandatory_data = g_new0(wtapng_if_descr_mandatory_t, 1); |