From Pawel Dziepak:dissect_rpc_array causes assertion fault when array is empty. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8145

svn path=/trunk/; revision=46805
This commit is contained in:
Anders Broman 2012-12-27 12:55:05 +00:00
parent db0c2de004
commit 93218a7c76
1 changed files with 9 additions and 8 deletions

View File

@ -796,18 +796,19 @@ dissect_rpc_array(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
num = tvb_get_ntohl(tvb, offset);
if( num == 0 ){
proto_tree_add_none_format(tree, hfindex, tvb, offset, 4,
"no values");
offset += 4;
return offset;
}
lock_item = proto_tree_add_item(tree, hfindex, tvb, offset, -1, ENC_NA);
lock_tree = proto_item_add_subtree(lock_item, ett_rpc_array);
if(num == 0) {
proto_tree_add_text(lock_tree, tvb, offset, 4, "no values");
offset += 4;
proto_item_set_end(lock_item, tvb, offset);
return offset;
}
offset = dissect_rpc_uint32(tvb, lock_tree,
hf_rpc_array_len, offset);