diff options
author | Evan Huus <eapache@gmail.com> | 2013-08-31 02:50:32 +0000 |
---|---|---|
committer | Evan Huus <eapache@gmail.com> | 2013-08-31 02:50:32 +0000 |
commit | a8f4327da7f8439787bf5005711715fecceed1b8 (patch) | |
tree | 7d4ba8723f0626456faaf5ae1ee2fedbcd7caa73 /epan/dissectors/packet-m3ua.c | |
parent | 01f7a0425b20dc7b635226ea0d4cb1f803e376a9 (diff) |
Convert m3ua to wmem and use the pinfo pool for a variable that might be used
for an address. Fixes the recent valgrind fuzz failure.
svn path=/trunk/; revision=51608
Diffstat (limited to 'epan/dissectors/packet-m3ua.c')
-rw-r--r-- | epan/dissectors/packet-m3ua.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/epan/dissectors/packet-m3ua.c b/epan/dissectors/packet-m3ua.c index 6f72788825..84479d695f 100644 --- a/epan/dissectors/packet-m3ua.c +++ b/epan/dissectors/packet-m3ua.c @@ -39,7 +39,7 @@ #include <epan/packet.h> #include <epan/prefs.h> #include <epan/sctpppids.h> -#include <epan/emem.h> +#include <epan/wmem/wmem.h> #include "packet-mtp3.h" #include "packet-sccp.h" #include "packet-frame.h" @@ -1158,12 +1158,14 @@ dissect_protocol_data_parameter(tvbuff_t *parameter_tvb, packet_info *pinfo, pro guint16 ulp_length; tvbuff_t *payload_tvb; proto_item *item, *gen_item; - mtp3_tap_rec_t* mtp3_tap = ep_new0(mtp3_tap_rec_t); + mtp3_tap_rec_t* mtp3_tap; proto_tree *q708_tree; gint heuristic_standard; guint8 si; guint32 opc, dpc; + mtp3_tap = wmem_new0(pinfo->pool, mtp3_tap_rec_t); + si = tvb_get_guint8(parameter_tvb, DATA_SI_OFFSET); ulp_length = tvb_get_ntohs(parameter_tvb, PARAMETER_LENGTH_OFFSET) - PARAMETER_HEADER_LENGTH - DATA_HDR_LENGTH; payload_tvb = tvb_new_subset(parameter_tvb, DATA_ULP_OFFSET, ulp_length, ulp_length); |