aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2015-01-10 18:08:16 +0000
committerFlorian Fainelli <florian@openwrt.org>2015-01-10 18:08:16 +0000
commit5abdc7904ba9140f406bf5ed17543d99b4a64d3a (patch)
treeab15a86b4267aa96a2c4bed557321d9e6e6aad58 /tools
parenta474986d52551cf408b01cb16e4ed67ea318ec6b (diff)
downloadupstream-5abdc7904ba9140f406bf5ed17543d99b4a64d3a.tar.gz
upstream-5abdc7904ba9140f406bf5ed17543d99b4a64d3a.tar.bz2
upstream-5abdc7904ba9140f406bf5ed17543d99b4a64d3a.zip
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
Diffstat (limited to 'tools')
-rw-r--r--tools/firmware-utils/src/edimax_fw_header.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/firmware-utils/src/edimax_fw_header.c b/tools/firmware-utils/src/edimax_fw_header.c
index ff094da1ad..b85e3a1781 100644
--- a/tools/firmware-utils/src/edimax_fw_header.c
+++ b/tools/firmware-utils/src/edimax_fw_header.c
@@ -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));