aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-q931.c
diff options
context:
space:
mode:
authoretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>2005-12-01 06:20:17 +0000
committeretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>2005-12-01 06:20:17 +0000
commit7ddcb47eef403898eb58dcd4a379e4f580a3d2c3 (patch)
tree08f6b54fa90baa6a8ed134923470104db5ba85eb /epan/dissectors/packet-q931.c
parentdc27ade0d3679330e2078201351991bafa1a1939 (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.c11
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?
*/