aboutsummaryrefslogtreecommitdiffstats
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
commit0c5feac5731052fea718ebf350b13d9eaaefc432 (patch)
tree6e4c477881efd7ce349fd1cf21085d45ab19a046
parent3db73fc3506b917d8bac785d8adeb2daaa0429d7 (diff)
downloadupstream-0c5feac5731052fea718ebf350b13d9eaaefc432.tar.gz
upstream-0c5feac5731052fea718ebf350b13d9eaaefc432.tar.bz2
upstream-0c5feac5731052fea718ebf350b13d9eaaefc432.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> SVN-Revision: 43913
-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));