tn5220: prevent another potential endless loop

exit the loop if dissect_unknown_data() returns 0

Change-Id: I681d170d4daf8efb06231790652ff7c941b46d89
Reviewed-on: https://code.wireshark.org/review/4882
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
This commit is contained in:
Martin Kaiser 2014-10-20 22:56:34 +02:00
parent b757038160
commit 1463db37d9
1 changed files with 6 additions and 1 deletions

View File

@ -4729,7 +4729,12 @@ dissect_write_structured_field(proto_tree *tn5250_tree, tvbuff_t *tvb, gint offs
offset += tn5250_add_hf_items(tn5250_tree, tvb, offset,
dfdpck_top_row_fields);
} else {
offset += dissect_unknown_data(tn5250_tree, tvb, offset, start, length);
guint32 step;
step = dissect_unknown_data(tn5250_tree, tvb, offset, start, length);
if (step==0)
break;
offset += step;
}
}
break;