forked from osmocom/wireshark
[IEEE 802.11] fix two potential endless loops
add_tagged_field() may return 0 if the tag length is not what is expected for this particular tag Bug: 11110 Change-Id: Ia2fd6635613fb6d8e1264147d2ddd44162484887 Reviewed-on: https://code.wireshark.org/review/7989 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
This commit is contained in:
parent
e1b566c748
commit
e243b00413
|
@ -12290,6 +12290,8 @@ static int dissect_tfs_request(packet_info *pinfo, proto_tree *tree,
|
|||
s_end = offset + len;
|
||||
while (s_offset < s_end) {
|
||||
int tlen = add_tagged_field(pinfo, tree, tvb, s_offset, ftype);
|
||||
if (tlen==0)
|
||||
break;
|
||||
s_offset += tlen;
|
||||
}
|
||||
break;
|
||||
|
@ -12357,6 +12359,8 @@ static int dissect_tfs_response(packet_info *pinfo, proto_tree *tree,
|
|||
s_end = offset + len;
|
||||
while (s_offset < s_end) {
|
||||
int tlen = add_tagged_field(pinfo, tree, tvb, s_offset, ftype);
|
||||
if (tlen==0)
|
||||
break;
|
||||
s_offset += tlen;
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue