aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-btavdtp.c
diff options
context:
space:
mode:
authorEvan Huus <eapache@gmail.com>2014-05-09 09:42:12 -0400
committerEvan Huus <eapache@gmail.com>2014-05-09 15:14:09 +0000
commit532c3bc7837ba739c5a290a2db3a44fbe08d25c0 (patch)
treeb1f0b6189da94fd55709b58c2bd4dccba82f79a4 /epan/dissectors/packet-btavdtp.c
parentcfe3bfdc25bf105c056acbbb212a2ea53a6eaedb (diff)
Initialize int_seid to 0 in btavdtp dissector
Fixes uninitialized read in fuzzed capture. While I'm there, reorder the fields to reduce alignment-padding and shrink the size of the sep_entry_t struct slightly. Bug:10095 Change-Id: I3ace279e97874dbcfeb36f947c4c3428bd83e490 Reviewed-on: https://code.wireshark.org/review/1574 Reviewed-by: Evan Huus <eapache@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-btavdtp.c')
-rw-r--r--epan/dissectors/packet-btavdtp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/epan/dissectors/packet-btavdtp.c b/epan/dissectors/packet-btavdtp.c
index ba80ae425a..58a9719134 100644
--- a/epan/dissectors/packet-btavdtp.c
+++ b/epan/dissectors/packet-btavdtp.c
@@ -453,9 +453,9 @@ typedef struct _sep_entry_t {
guint8 seid;
guint8 type;
guint8 media_type;
+ guint8 int_seid;
gint codec;
gint content_protection_type;
- guint8 int_seid;
enum sep_state state;
} sep_entry_t;
@@ -608,9 +608,10 @@ dissect_sep(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gint offset,
sep_data = wmem_new(wmem_file_scope(), sep_entry_t);
sep_data->seid = seid;
sep_data->type = type;
+ sep_data->media_type = media_type;
+ sep_data->int_seid = 0;
sep_data->codec = -1;
sep_data->content_protection_type = 0;
- sep_data->media_type = media_type;
if (in_use) {
sep_data->state = SEP_STATE_IN_USE;
} else {