From ed1e229cb75ddb5abb6c82f4c25ab4fa989061c9 Mon Sep 17 00:00:00 2001 From: Michael Mann Date: Thu, 10 Apr 2014 08:53:53 -0400 Subject: Fix infinite loop. Bug 9970 Change-Id: I4f928187b9ba3e522f63f6b6987587e3638d8ba7 Reviewed-on: https://code.wireshark.org/review/1057 Reviewed-by: Francesco Fondelli Reviewed-by: Michael Mann --- epan/dissectors/packet-openflow_v4.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'epan/dissectors/packet-openflow_v4.c') diff --git a/epan/dissectors/packet-openflow_v4.c b/epan/dissectors/packet-openflow_v4.c index 06ed00ae90..4d17bf8de0 100644 --- a/epan/dissectors/packet-openflow_v4.c +++ b/epan/dissectors/packet-openflow_v4.c @@ -2137,13 +2137,15 @@ dissect_openflow_action_v4(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tr case OFPAT_EXPERIMENTER: proto_tree_add_expert_format(act_tree, pinfo, &ei_openflow_v4_action_undecoded, tvb, offset, act_length - 8, "Experimenter action body."); - offset += act_length - 8; + if (act_length > 8) + offset += act_length - 8; break; default: proto_tree_add_expert_format(act_tree, pinfo, &ei_openflow_v4_action_undecoded, tvb, offset, act_length - 4, "Unknown action body."); - offset += act_length - 4; + if (act_length > 4) + offset += act_length - 4; break; } -- cgit v1.2.3