aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorEvan Huus <eapache@gmail.com>2014-07-26 21:39:11 -0400
committerEvan Huus <eapache@gmail.com>2014-07-27 01:40:37 +0000
commitd95d7752faf5fd37d764a9cfa15e8d7e63dd954f (patch)
tree6c9831b7c3dfc479fe6e852d9a73aeffc656432d /epan
parent2b719460797b3096f69bef67deb2ab997ddf703a (diff)
Fix yet another openflow underflow issue.
I thought I'd found all of these but I guess I hadn't; good thing the fuzz-bot kept looking. Bug:10314 Change-Id: I2cc209a6c87781d10cae28f2cb91400d759f5091 Reviewed-on: https://code.wireshark.org/review/3205 Reviewed-by: Evan Huus <eapache@gmail.com>
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-openflow_v4.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/epan/dissectors/packet-openflow_v4.c b/epan/dissectors/packet-openflow_v4.c
index 5e20c045e3..f17fea22f3 100644
--- a/epan/dissectors/packet-openflow_v4.c
+++ b/epan/dissectors/packet-openflow_v4.c
@@ -2484,6 +2484,10 @@ dissect_openflow_instruction_v4(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tre
inst_type = tvb_get_ntohs(tvb, offset);
inst_length = tvb_get_ntohs(tvb, offset + 2);
+ if (inst_length < 8) {
+ inst_length = 8;
+ }
+
inst_tree = proto_tree_add_subtree(tree, tvb, offset, inst_length, ett_openflow_v4_instruction, NULL, "Instruction");
offset = dissect_openflow_instruction_header_v4(tvb, pinfo, inst_tree, offset, length);