aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-mq.c
diff options
context:
space:
mode:
authorgerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>2006-07-07 22:39:23 +0000
committergerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>2006-07-07 22:39:23 +0000
commitab9fab851bc31690a0e059d2186998c30b70561c (patch)
tree3d10d96a72d94b1059cff823ab3742b45d63bfe5 /epan/dissectors/packet-mq.c
parent6bf7020d564f3d33d48b835c94ab3c5ad6cbed21 (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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@18685 f5534014-38df-0310-8fa8-9805f1628bb7
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)
{