forked from osmocom/wireshark
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>
This commit is contained in:
parent
1ac7de58c7
commit
828358d22c
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue