diff options
author | Michael Mann <mmann78@netscape.net> | 2014-04-10 08:53:53 -0400 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2014-04-10 17:34:36 +0000 |
commit | ed1e229cb75ddb5abb6c82f4c25ab4fa989061c9 (patch) | |
tree | eb4343f400fb3e4b5034bcf1bf83c4e25b8adeb5 /epan/dissectors/packet-openflow_v4.c | |
parent | f5b26da04923bb9a973633a24ba9492bb42f9926 (diff) |
Fix infinite loop. Bug 9970
Change-Id: I4f928187b9ba3e522f63f6b6987587e3638d8ba7
Reviewed-on: https://code.wireshark.org/review/1057
Reviewed-by: Francesco Fondelli <francesco.fondelli@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-openflow_v4.c')
-rw-r--r-- | epan/dissectors/packet-openflow_v4.c | 6 |
1 files changed, 4 insertions, 2 deletions
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; } |