Author: florian
Date: 2015-01-10 19:08:16 +0100 (Sat, 10 Jan 2015)
New Revision: 43913

Modified:
   trunk/tools/firmware-utils/src/edimax_fw_header.c
Log:
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]>

Modified: trunk/tools/firmware-utils/src/edimax_fw_header.c
===================================================================
--- trunk/tools/firmware-utils/src/edimax_fw_header.c   2015-01-10 17:23:55 UTC 
(rev 43912)
+++ trunk/tools/firmware-utils/src/edimax_fw_header.c   2015-01-10 18:08:16 UTC 
(rev 43913)
@@ -281,7 +281,7 @@
 
        /* 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));
_______________________________________________
openwrt-commits mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-commits

Reply via email to