aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-openwire.c
diff options
context:
space:
mode:
authorEvan Huus <eapache@gmail.com>2013-10-08 23:16:53 +0000
committerEvan Huus <eapache@gmail.com>2013-10-08 23:16:53 +0000
commit74501b2874a4e4fe55905d592e9553e8dee3f4c1 (patch)
tree8e37ad10d9b53c1acb6796467e8e9b280baf280a /epan/dissectors/packet-openwire.c
parentd95d8d78518ebab67ee800acad33ead3ceecb512 (diff)
Hacky fix for https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9248
Just break out of the loop if offset doesn't go up. There's almost certainly a better fix - the dissector is weird, and I'm not sure if all the _length_remaining() checks are important or legacy, and what affect they have on this issue. At the very least this will pacify the fuzzbots until somebody has time to figure it out properly. svn path=/trunk/; revision=52458
Diffstat (limited to 'epan/dissectors/packet-openwire.c')
-rw-r--r--epan/dissectors/packet-openwire.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/epan/dissectors/packet-openwire.c b/epan/dissectors/packet-openwire.c
index b6e77d4652..819955ba50 100644
--- a/epan/dissectors/packet-openwire.c
+++ b/epan/dissectors/packet-openwire.c
@@ -946,6 +946,9 @@ dissect_openwire_type(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int o
/* Value */
offset += dissect_openwire_type(tvb, pinfo, entry_tree, offset, hf_openwire_none, OPENWIRE_TYPE_NESTED, type, FALSE);
proto_item_set_len(map_entry, offset - entryStartOffset);
+ if (offset - entryStartOffset <= 0) {
+ break;
+ }
}
}
}