aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-mq.c
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2006-07-07 22:39:23 +0000
committerGerald Combs <gerald@wireshark.org>2006-07-07 22:39:23 +0000
commit545236879f3b1f9d056355c1f6d7066e9a9d99be (patch)
tree3d10d96a72d94b1059cff823ab3742b45d63bfe5 /epan/dissectors/packet-mq.c
parent515562005d87df801c31b81437c80390a739540c (diff)
Fix more bugs reported by Ilja van Sprundel.
packet-pktc.c: Catch an underflow. packet-ospf.c: Don't burn CPU cycles unnecessarily. packet-rpc.c: Catch an overflow. packet-mq.c: Check a header size. Fix up whitespace. svn path=/trunk/; revision=18685
Diffstat (limited to 'epan/dissectors/packet-mq.c')
-rw-r--r--epan/dissectors/packet-mq.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/epan/dissectors/packet-mq.c b/epan/dissectors/packet-mq.c
index 87f996e937..9529b4917c 100644
--- a/epan/dissectors/packet-mq.c
+++ b/epan/dissectors/packet-mq.c
@@ -2204,7 +2204,10 @@ dissect_mq_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
/* Dissect the generic part of the other pre-defined headers */
/* We assume that only one such header is present */
gint iSizeHeader = 0;
- iSizeHeader = tvb_get_guint32_endian(tvb, offset + 8, bLittleEndian);
+ iSizeHeader = (gint) tvb_get_guint32_endian(tvb, offset + 8, bLittleEndian);
+ /* XXX - 32 is inferred from the code below. What's the
+ * correct minimum? */
+ DISSECTOR_ASSERT(iSizeHeader > 32);
if (tvb_length_remaining(tvb, offset) >= iSizeHeader)
{