forked from osmocom/wireshark
Dissection of sid28 needs null check.
Bug: 10542 Change-Id: I8fcfbbd96833af2c57754a4c8f96cf702972e22a Reviewed-on: https://code.wireshark.org/review/4603 Reviewed-by: Michael Mann <mmann78@netscape.net>
This commit is contained in:
parent
5c5bf3b370
commit
6e42a72923
|
@ -1354,14 +1354,14 @@ dissect_ndr_nt_SID28(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
|||
hf_nt_domain_sid);
|
||||
/* The dissected stuff can't be more than 28 bytes */
|
||||
if ((newoffset - offset) > 28) {
|
||||
item = proto_tree_get_parent(tree->last_child);
|
||||
item = proto_tree_get_parent(tree? tree->last_child : NULL);
|
||||
expert_add_info(pinfo, item, &ei_dcerpc_nt_badsid);
|
||||
|
||||
/* The rest of the dissection will most probably wrong as we are not dissecting what we expect */
|
||||
return newoffset;
|
||||
}
|
||||
|
||||
/* No matter how much we used for the real dissection of the SID consume 28 bytes */
|
||||
/* No matter how much we used for the real dissection of the SID consume 28 bytes */
|
||||
if (tree) {
|
||||
item = proto_tree_get_parent(tree->last_child);
|
||||
proto_item_set_len(item, 28);
|
||||
|
|
Loading…
Reference in New Issue