aboutsummaryrefslogtreecommitdiffstats
path: root/epan/packet.c
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2017-01-07 00:39:17 +0100
committerMichael Mann <mmann78@netscape.net>2017-01-07 00:46:29 +0000
commit4dc983d648b49c7364fec069d36c09f802ec763c (patch)
treee4e2127ce16a14b3cf1a176e37a6634bde71ee3c /epan/packet.c
parent6a6d7ea34f43515dfe3f52aa96b943c272c925a7 (diff)
packet: fix memleak of "short_name" for heuristics dissectors
Change-Id: I3b954e3623473899b6039f0ff572eb56defe14cc Fixes: v2.3.0rc0-1841-ga8b68205a4 ("packet: duplicate short_name to fix UAF in wslua") Reviewed-on: https://code.wireshark.org/review/19571 Reviewed-by: Peter Wu <peter@lekensteyn.nl> Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/packet.c')
-rw-r--r--epan/packet.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/epan/packet.c b/epan/packet.c
index 174814ae72..01425f105a 100644
--- a/epan/packet.c
+++ b/epan/packet.c
@@ -148,7 +148,9 @@ static GHashTable* heuristic_short_names = NULL;
static void
destroy_heuristic_dissector_entry(gpointer data, gpointer user_data _U_)
{
- g_free(((heur_dtbl_entry_t*)data)->list_name);
+ heur_dtbl_entry_t *hdtbl_entry = (heur_dtbl_entry_t *)data;
+ g_free(hdtbl_entry->list_name);
+ g_free(hdtbl_entry->short_name);
g_slice_free(heur_dtbl_entry_t, data);
}