]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
arm: mach-omap2: mux: fix buffer overrun
authorAaro Koskinen <Aaro.Koskinen@nokia.com>
Fri, 7 Jan 2011 03:49:28 +0000 (19:49 -0800)
committerTony Lindgren <tony@atomide.com>
Fri, 7 Jan 2011 03:58:28 +0000 (19:58 -0800)
memcpy() copies 8 bytes too much (omap_mux_entry vs. omap_mux). Correct
by replacing memcpy() with struct assignment, which is safer.

Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap2/mux.c

index 17bd6394d22453e1fb83a35cade10c4e1ad29ef8..df8d2f2872c6edce5e8d72a2ac668c7f10ebe336 100644 (file)
@@ -893,7 +893,7 @@ static struct omap_mux * __init omap_mux_list_add(
                return NULL;
 
        m = &entry->mux;
-       memcpy(m, src, sizeof(struct omap_mux_entry));
+       entry->mux = *src;
 
 #ifdef CONFIG_OMAP_MUX
        if (omap_mux_copy_names(src, m)) {