From: Aaro Koskinen Date: Fri, 7 Jan 2011 03:49:28 +0000 (-0800) Subject: arm: mach-omap2: mux: fix buffer overrun X-Git-Tag: firefly_0821_release~7613^2~2698^2~25 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=3083314238afb593b598dca4bab4bb6ae09a6c82;p=firefly-linux-kernel-4.4.55.git arm: mach-omap2: mux: fix buffer overrun 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 Signed-off-by: Tony Lindgren --- diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c index 17bd6394d224..df8d2f2872c6 100644 --- a/arch/arm/mach-omap2/mux.c +++ b/arch/arm/mach-omap2/mux.c @@ -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)) {