From: Kumar Gala Date: Tue, 30 Jan 2007 16:58:19 -0600 Subject: [U-Boot-Users] [PATCH] mpc83xx: protect memcpy to bad address if a local-mac-address is missing from dt In-Reply-To: <20070130161521.07e39765.kim.phillips@freescale.com> References: <20070130161521.07e39765.kim.phillips@freescale.com> Message-ID: <069262D0-9C41-4F04-83EC-79854774B1C8@kernel.crashing.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Jan 30, 2007, at 4:15 PM, Kim Phillips wrote: > protect memcpy to bad address if a local-mac-address is missing > from dt How about fixing 85xx as well since its broken in the same way. - k > --- > cpu/mpc83xx/cpu.c | 2 ++ > 1 files changed, 2 insertions(+), 0 deletions(-) > > diff --git a/cpu/mpc83xx/cpu.c b/cpu/mpc83xx/cpu.c > index bc61219..f1b2749 100644 > --- a/cpu/mpc83xx/cpu.c > +++ b/cpu/mpc83xx/cpu.c > @@ -309,11 +309,13 @@ ft_cpu_setup(void *blob, bd_t *bd) > > #ifdef CONFIG_MPC83XX_TSEC1 > p = ft_get_prop(blob, "/" OF_SOC "/ethernet at 24000/local-mac- > address", &len); > + if (p != NULL) > memcpy(p, bd->bi_enetaddr, 6); > #endif > > #ifdef CONFIG_MPC83XX_TSEC2 > p = ft_get_prop(blob, "/" OF_SOC "/ethernet at 25000/local-mac- > address", &len); > + if (p != NULL) > memcpy(p, bd->bi_enet1addr, 6); > #endif > } > -- > 1.4.4 > > > ---------------------------------------------------------------------- > --- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to > share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php? > page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > U-Boot-Users mailing list > U-Boot-Users at lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/u-boot-users