forked from osmocom/wireshark
tn5250: fix an endless loop, exit when offset is not incremented
Bug: 10596 Change-Id: I64509aa49fce4893dee4e7a74a560e09a98830f6 Reviewed-on: https://code.wireshark.org/review/4878 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx> Tested-by: Martin Kaiser <wireshark@kaiser.cx>
This commit is contained in:
parent
a2508bda19
commit
bc27265781
|
@ -4654,6 +4654,8 @@ dissect_write_structured_field(proto_tree *tn5250_tree, tvbuff_t *tvb, gint offs
|
|||
length = tvb_get_guint8(tvb,offset);
|
||||
proto_tree_add_item(tn5250_tree, hf_tn5250_length, tvb, offset,
|
||||
1, ENC_BIG_ENDIAN);
|
||||
if (length==0)
|
||||
break;
|
||||
proto_tree_add_item(tn5250_tree, hf_tn5250_dpt_ec, tvb, offset,
|
||||
length, ENC_EBCDIC|ENC_NA);
|
||||
offset += length;
|
||||
|
|
Loading…
Reference in New Issue