diff options
author | Aaro Koskinen <Aaro.Koskinen@nokia.com> | 2011-01-06 22:49:28 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2011-01-06 22:58:28 -0500 |
commit | 3083314238afb593b598dca4bab4bb6ae09a6c82 (patch) | |
tree | 29c5f5155a312e3c6943b0bb1fe4f87358bc2e45 /arch/arm/mach-omap2/mux.c | |
parent | e118a1df32c41186f717bbe6b42142741530e8b9 (diff) |
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 <aaro.koskinen@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/mux.c')
-rw-r--r-- | arch/arm/mach-omap2/mux.c | 2 |
1 files changed, 1 insertions, 1 deletions
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( | |||
893 | return NULL; | 893 | return NULL; |
894 | 894 | ||
895 | m = &entry->mux; | 895 | m = &entry->mux; |
896 | memcpy(m, src, sizeof(struct omap_mux_entry)); | 896 | entry->mux = *src; |
897 | 897 | ||
898 | #ifdef CONFIG_OMAP_MUX | 898 | #ifdef CONFIG_OMAP_MUX |
899 | if (omap_mux_copy_names(src, m)) { | 899 | if (omap_mux_copy_names(src, m)) { |