mirror of
https://github.com/hak5/wifipineapple-openwrt.git
synced 2025-10-29 16:57:19 +00:00
tools: edimax_fw_header: fix suspicious memset usage
memset() was called with a size argument against a pointer size, not the structure size itself. Signed-off-by: Florian Fainelli <florian@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@43913 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
a474986d52
commit
5abdc7904b
@ -281,7 +281,7 @@ static int build_fw(void)
|
||||
|
||||
/* fill firmware header */
|
||||
hdr = (struct edimax_header *)buf;
|
||||
memset(hdr, 0, sizeof(struct edimax_header *));
|
||||
memset(hdr, 0, sizeof(struct edimax_header));
|
||||
|
||||
strncpy(hdr->model, model, sizeof(hdr->model));
|
||||
strncpy(hdr->magic, magic, sizeof(hdr->magic));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user