diff options
author | Anders Broman <anders.broman@ericsson.com> | 2013-10-15 18:19:57 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2013-10-15 18:19:57 +0000 |
commit | 9c3be9d5aef912c8cad33cf414dff1b2c8ef9d8f (patch) | |
tree | d188801bf4500a5daf56872b4ae9cca4617bf21d /epan/dissectors/packet-dplay.c | |
parent | 4ae53bc208154b729e97da181ae4c73958a44a69 (diff) |
Try to optimize heuristics slightly.
svn path=/trunk/; revision=52624
Diffstat (limited to 'epan/dissectors/packet-dplay.c')
-rw-r--r-- | epan/dissectors/packet-dplay.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/epan/dissectors/packet-dplay.c b/epan/dissectors/packet-dplay.c index 5c155b7a19..94cdbdbf6c 100644 --- a/epan/dissectors/packet-dplay.c +++ b/epan/dissectors/packet-dplay.c @@ -1153,18 +1153,19 @@ static void dissect_dplay_player_msg(tvbuff_t *tvb, packet_info *pinfo, proto_tr } static gboolean heur_dissect_dplay(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) { - guint8 signature[] = {'p','l','a','y'}; guint32 dplay_id, token; if(tvb_length(tvb) < 25) return FALSE; + /* The string play = 0x706c6179 */ dplay_id = tvb_get_letohl(tvb, 20); - if( memcmp(signature, (guint8 *)&dplay_id, 4) == 0) { + if( dplay_id == 0x706c6179) { dissect_dplay(tvb, pinfo, tree); return TRUE; } + /* There is a player to player message that does not contain "play" */ token = tvb_get_letohl(tvb, 0); token = (token & 0xfff00000) >> 20; |