diff options
author | Chris Maynard <Christopher.Maynard@GTECH.COM> | 2013-12-12 20:40:12 +0000 |
---|---|---|
committer | Chris Maynard <Christopher.Maynard@GTECH.COM> | 2013-12-12 20:40:12 +0000 |
commit | 06282f3eee7a1bfcd5b9e6e1242a3ae1f3ca1464 (patch) | |
tree | 30a65ad95165550a1ecbea74f589ec2db2949d3c | |
parent | 5a2dd0e9ace420c85c68ee9d38ee8ae577409fb0 (diff) |
Fix Visual Studio Code Analysis warning C6385: Invalid data: accessing 'tag_to_type', the readable size is '136' bytes, but '540' bytes might be read
svn path=/trunk/; revision=53984
-rw-r--r-- | epan/dissectors/file-elf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/dissectors/file-elf.c b/epan/dissectors/file-elf.c index 11fb0c1788..0a95586db3 100644 --- a/epan/dissectors/file-elf.c +++ b/epan/dissectors/file-elf.c @@ -734,7 +734,7 @@ dissect_dynamic(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *entry_tree, p proto_item_append_text(pitem, " (%s)", rval_to_str(value_guard(tag), dynamic_tag_rvals, "Unknown")); offset += 8; - if (tag < sizeof(tag_to_type) && tag_to_type[tag] == DYNAMIC_TYPE_VALUE) + if (tag < (sizeof(tag_to_type)/sizeof(int)) && tag_to_type[tag] == DYNAMIC_TYPE_VALUE) proto_tree_add_item(entry_tree, hf_elf64_dynamic_value, tvb, offset, 8, machine_encoding); else if (tag < sizeof(tag_to_type) && tag_to_type[tag] == DYNAMIC_TYPE_POINTER) proto_tree_add_item(entry_tree, hf_elf64_dynamic_pointer, tvb, offset, 8, machine_encoding); |