Skip to content

Commit

Permalink
arm: mach-omap2: mux: fix buffer overrun
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Aaro Koskinen authored and Tony Lindgren committed Jan 7, 2011
1 parent e118a1d commit 3083314
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/mux.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit 3083314

Please sign in to comment.