diff options
author | etxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7> | 2005-12-01 06:20:17 +0000 |
---|---|---|
committer | etxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7> | 2005-12-01 06:20:17 +0000 |
commit | 7ddcb47eef403898eb58dcd4a379e4f580a3d2c3 (patch) | |
tree | 08f6b54fa90baa6a8ed134923470104db5ba85eb /epan/dissectors/packet-q931.c | |
parent | dc27ade0d3679330e2078201351991bafa1a1939 (diff) |
From Jaap Keuter:
Q.931 fails to pass long message to H.225
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@16631 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-q931.c')
-rw-r--r-- | epan/dissectors/packet-q931.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/epan/dissectors/packet-q931.c b/epan/dissectors/packet-q931.c index 3e34a32719..dacb59e4e8 100644 --- a/epan/dissectors/packet-q931.c +++ b/epan/dissectors/packet-q931.c @@ -45,6 +45,10 @@ #include <epan/lapd_sapi.h> #include "packet-tpkt.h" +#ifndef min +#define min(a,b) (((a)<(b))?(a):(b)) +#endif + /* Q.931 references: * * http://www.acacia-net.com/Clarinet/Protocol/q9313svn.htm @@ -2625,6 +2629,13 @@ dissect_q931_IEs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *root_tree, if (info_element_len > 1) { /* + * If we don't desegment limit the length + * to the actual size in the frame + */ + if (!pinfo->can_desegment) { + info_element_len = min(info_element_len, tvb_length_remaining(tvb, offset + 4)); + } + /* * Do we have a handle for the H.225 * dissector? */ |