summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2015-02-20 12:47:52 +0100
committerPascal Quantin <pascal.quantin@gmail.com>2015-02-20 11:50:14 +0000
commit9fe9505b46f17de2fdb6228e9c03280957704e92 (patch)
tree49a195a4e59c8853af2e7b20da1c09ba69904ce7
parenta99cc2fd0b56da03fdd086b1210e1bee1cb1c778 (diff)
downloadwireshark-9fe9505b46f17de2fdb6228e9c03280957704e92.tar.gz
addr_resolv.c: fix a stack buffer overflow detected by ASAN
Issue reported by Alexis Change-Id: I0ef19625b6844fbc2996b75d51e86f949e358c8d Reviewed-on: https://code.wireshark.org/review/7273 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
-rw-r--r--epan/addr_resolv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/epan/addr_resolv.c b/epan/addr_resolv.c
index 75619eb781..7148ce642e 100644
--- a/epan/addr_resolv.c
+++ b/epan/addr_resolv.c
@@ -1286,7 +1286,7 @@ static hashmanuf_t *manuf_hash_new_entry(const guint8 *addr, char* name)
manuf_value->resolved_name[0] = '\0';
}
/* Values returned by bytes_to_hexstr_punct() are *not* null-terminated */
- endp = bytes_to_hexstr_punct(manuf_value->hexaddr, addr, sizeof(manuf_value->hexaddr), ':');
+ endp = bytes_to_hexstr_punct(manuf_value->hexaddr, addr, sizeof(manuf_value->addr), ':');
*endp = '\0';
g_hash_table_insert(manuf_hashtable, manuf_key, manuf_value);