diff options
author | AndersBroman <anders.broman@ericsson.com> | 2015-04-27 13:24:49 +0200 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2015-04-27 11:27:28 +0000 |
commit | af11fde75da076a809b87520404240e901032c52 (patch) | |
tree | 23b912a3286d974698ed47d4c226ad84773c26b4 /asn1 | |
parent | 5b1d62c50b36fcae939e61ba7ac6f65a4a846626 (diff) |
[RANAP] Heuristics does not work with lenght detremant of 2 bytes.
Change-Id: Ib26b9d66e690770a27d63f75f4c9a935fc93b2b0
Reviewed-on: https://code.wireshark.org/review/8209
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'asn1')
-rw-r--r-- | asn1/ranap/packet-ranap-template.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/asn1/ranap/packet-ranap-template.c b/asn1/ranap/packet-ranap-template.c index 4aa0168d60..e20cc7b967 100644 --- a/asn1/ranap/packet-ranap-template.c +++ b/asn1/ranap/packet-ranap-template.c @@ -289,9 +289,11 @@ dissect_sccp_ranap_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, voi temp = tvb_get_guint8(tvb, MSG_TYPE_OFFSET); if (temp > RANAP_MAX_PC) { return FALSE; } - /* Try to strengthen the heuristic further, by checking byte 6 and 7 which usually is a sequence-of length */ - word = tvb_get_ntohs(tvb,5); - if(word > 0x1ff){ + /* Try to strengthen the heuristic further, by checking the byte following the length and the bitfield indicating extensions etc + * which usually is a sequence-of length + */ + word = tvb_get_ntohs(tvb, offset + 1); + if (word > 0x1ff){ return FALSE; } dissect_ranap(tvb, pinfo, tree, data); |