mirror of
https://github.com/openwrt/openwrt.git
synced 2025-01-02 20:16:59 +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> SVN-Revision: 43913
This commit is contained in:
parent
3db73fc350
commit
0c5feac573
@ -281,7 +281,7 @@ static int build_fw(void)
|
|||||||
|
|
||||||
/* fill firmware header */
|
/* fill firmware header */
|
||||||
hdr = (struct edimax_header *)buf;
|
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->model, model, sizeof(hdr->model));
|
||||||
strncpy(hdr->magic, magic, sizeof(hdr->magic));
|
strncpy(hdr->magic, magic, sizeof(hdr->magic));
|
||||||
|
Loading…
Reference in New Issue
Block a user