diff options
author | Martin Kaiser <wireshark@kaiser.cx> | 2016-05-26 15:53:23 +0200 |
---|---|---|
committer | Martin Kaiser <wireshark@kaiser.cx> | 2016-05-30 20:51:02 +0000 |
commit | 7d29f41e1e275b78faa21f93b86e6303786ac150 (patch) | |
tree | a1b3c4be1fc8ae3a819ebb3c6b678319e833a19e /epan | |
parent | c046ea826c946355f4f406cbb5209e39fbb89444 (diff) |
dcerpc-fileexp: don't THROW() an exception from a dissector
exit if the ACL length is smaller than expected
Change-Id: I86e218a31ee1d5d1cb95eb3438ca5dc1a87205d4
Reviewed-on: https://code.wireshark.org/review/15626
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-dcerpc-fileexp.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/epan/dissectors/packet-dcerpc-fileexp.c b/epan/dissectors/packet-dcerpc-fileexp.c index 11e21a3f5f..e398c2ce1d 100644 --- a/epan/dissectors/packet-dcerpc-fileexp.c +++ b/epan/dissectors/packet-dcerpc-fileexp.c @@ -754,7 +754,7 @@ dissect_afsAcl (tvbuff_t *tvb, int offset, */ proto_item *item = NULL; - proto_tree *tree = NULL; + proto_tree *tree; int old_offset = offset; guint32 acl_len; e_guid_t uuid1, defaultcell; @@ -764,10 +764,7 @@ dissect_afsAcl (tvbuff_t *tvb, int offset, return offset; } - if (parent_tree) - { - tree = proto_tree_add_subtree (parent_tree, tvb, offset, -1, ett_fileexp_afsAcl, &item, "afsAcl"); - } + tree = proto_tree_add_subtree (parent_tree, tvb, offset, -1, ett_fileexp_afsAcl, &item, "afsAcl"); offset = dissect_ndr_uint32 (tvb, offset, pinfo, tree, di, drep, hf_fileexp_acl_len, @@ -794,10 +791,13 @@ dissect_afsAcl (tvbuff_t *tvb, int offset, defaultcell.data4[4], defaultcell.data4[5], defaultcell.data4[6], defaultcell.data4[7]); - offset += (acl_len - 38); + if (acl_len < 38) + { + /* XXX - exception */ + return offset; + } - if (offset <= old_offset) - THROW (ReportedBoundsError); + offset += (acl_len - 38); proto_item_set_len (item, offset-old_offset); return offset; |