From 06282f3eee7a1bfcd5b9e6e1242a3ae1f3ca1464 Mon Sep 17 00:00:00 2001 From: Chris Maynard Date: Thu, 12 Dec 2013 20:40:12 +0000 Subject: 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 --- epan/dissectors/file-elf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'epan/dissectors/file-elf.c') 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); -- cgit v1.2.3