aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-openflow_v5.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2015-07-14 21:34:29 -0400
committerMichael Mann <mmann78@netscape.net>2015-07-15 11:27:41 +0000
commit828358d22c6bcf0a1ade5b3ffaa8018a385bfc6c (patch)
treed4b6ed0ef5a9d2a581159d19dde1d010cf0f4bb0 /epan/dissectors/packet-openflow_v5.c
parent1ac7de58c7c2d5c030fe0202e8e76bff8608624e (diff)
Openflow - prevent infinite loop
Change-Id: I93ce7151467c890c12f7d612b5a7eecf5f91c189 Ping-Bug: 11358 Reviewed-on: https://code.wireshark.org/review/9640 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-openflow_v5.c')
-rw-r--r--epan/dissectors/packet-openflow_v5.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/epan/dissectors/packet-openflow_v5.c b/epan/dissectors/packet-openflow_v5.c
index 2df9aeeb18..a1b8bb6abe 100644
--- a/epan/dissectors/packet-openflow_v5.c
+++ b/epan/dissectors/packet-openflow_v5.c
@@ -3429,6 +3429,7 @@ dissect_openflow_tablemod_v5(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *
{
proto_item *ti;
proto_tree *conf_tree;
+ int save_offset;
/* uint8_t table_id; */
if (tvb_get_guint8(tvb, offset) <= OFPTT_MAX) {
@@ -3452,7 +3453,12 @@ dissect_openflow_tablemod_v5(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *
/* struct ofp_table_mod_prop_header properties[0]; */
while (offset < length) {
+ save_offset = offset;
offset = dissect_openflow_tablemod_prop_v5(tvb, pinfo, tree, offset, length);
+ if (offset <= save_offset) {
+ /* We don't need to go backwards or introduce an infinite loop */
+ break;
+ }
}
}