aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-gvsp.c
diff options
context:
space:
mode:
authorAlexis La Goutte <alexis.lagoutte@gmail.com>2016-07-21 23:27:05 +0200
committerAnders Broman <a.broman58@gmail.com>2016-07-26 04:02:45 +0000
commit6fbaf9be34e8745b2781294afdcf2822528a6349 (patch)
treeddbdd2cf154759732f3bbad1d8a950aa9b0dd21e /epan/dissectors/packet-gvsp.c
parentd3ce757de040f32f3cd12eb76b256257a1210bcf (diff)
GVSP: enforce heuristic (get some false positive with STUN)
Change-Id: Ic1da51a71ee4fa60267751d7bb3f46225ad2f084 Reviewed-on: https://code.wireshark.org/review/16573 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-gvsp.c')
-rw-r--r--epan/dissectors/packet-gvsp.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/epan/dissectors/packet-gvsp.c b/epan/dissectors/packet-gvsp.c
index 5cf1068871..cbcabd66a1 100644
--- a/epan/dissectors/packet-gvsp.c
+++ b/epan/dissectors/packet-gvsp.c
@@ -1404,6 +1404,16 @@ static gboolean dissect_gvsp_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree
/* Check for valid format types */
if (format >= 1 && format <= 6)
{
+ if(format == GVSP_PACKET_LEADER && tvb_captured_length_remaining(tvb, 8) >= 2)
+ {
+ guint32 payloadtype;
+ payloadtype = tvb_get_ntohs(tvb, 8);
+ payloadtype &= 0x3FFF;
+ if (try_val_to_str_ext(payloadtype, &payloadtypenames_ext) == NULL ){
+ return FALSE;
+ }
+ }
+
conversation = find_or_create_conversation(pinfo);
conversation_set_dissector(conversation, gvsp_handle);
dissect_gvsp(tvb, pinfo, tree, data);