瀏覽代碼

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 <[email protected]>

SVN-Revision: 43913
Florian Fainelli 11 年之前
父節點
當前提交
0c5feac573
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      tools/firmware-utils/src/edimax_fw_header.c

+ 1 - 1
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));