From 825cd51359b096151f6c16e09ad08ac3beed69e3 Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Sat, 10 Jan 2015 18:08:16 +0000 Subject: [PATCH] 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 --- src/edimax_fw_header.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/edimax_fw_header.c b/src/edimax_fw_header.c index ff094da..b85e3a1 100644 --- a/src/edimax_fw_header.c +++ b/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)); -- 2.30.2