From: Florian Fainelli Date: Sat, 10 Jan 2015 18:08:16 +0000 (+0000) Subject: tools: edimax_fw_header: fix suspicious memset usage X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=0c5feac5731052fea718ebf350b13d9eaaefc432;p=openwrt%2Fstaging%2Fnbd.git 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 SVN-Revision: 43913 --- 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));