forked from osmocom/wireshark
dect-dlc: Don't call NWK dissector if there's no payload
Change-Id: Ia86185f52b724be61db2d94ffaf51fd00ebab84c
This commit is contained in:
parent
cb64efe0d1
commit
442f621017
|
@ -139,12 +139,14 @@ static int dissect_dect_dlc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
|
|||
len = length >> 2;
|
||||
|
||||
available_length = tvb_captured_length(tvb) - 3;
|
||||
payload = tvb_new_subset_length_caplen(tvb, 3, MIN(len, available_length), len);
|
||||
if (available_length > 0) {
|
||||
payload = tvb_new_subset_length_caplen(tvb, 3, MIN(len, available_length), len);
|
||||
|
||||
/* FIXME: fragment reassembly like in packet-lapdm.c */
|
||||
/* FIXME: fragment reassembly like in packet-lapdm.c */
|
||||
|
||||
if (!dissector_try_uint(dlc_sapi_dissector_table, sapi, payload, pinfo, tree))
|
||||
call_data_dissector(payload, pinfo, tree);
|
||||
if (!dissector_try_uint(dlc_sapi_dissector_table, sapi, payload, pinfo, tree))
|
||||
call_data_dissector(payload, pinfo, tree);
|
||||
}
|
||||
|
||||
return tvb_captured_length(tvb);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue