Re: [PATCH 2.6]: IPv6: strcpy -> strlcpy

From: YOSHIFUJI Hideaki / 吉藤英明
Date: Thu Nov 27 2003 - 14:55:27 EST


In article <20031127194602.A25015@xxxxxxxxxxxxxxxxxxxxxx> (at Thu, 27 Nov 2003 19:46:02 +0000), Russell King <rmk+lkml@xxxxxxxxxxxxxxxx> says:

> > > > I agree, using sizeof() is the less error prone way of
> > > > doing things like this.
> > > >
> > > > Felipe could you please rewrite your patch like this?
> > >
> > > Done!
> >
> > Thanks. Ok to me.
>
> I'm slightly cautious here, although I haven't read the patch yet.
> Did anyone consider whether any of these structures were copied to
> user space, and whether, as a result of this change, we're now
> copying uninitialised data to users?

I believe that it, to change from strcpy() to strlcpy(), just
eliminates possibility of buffer-overrun.

--yoshfuji
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/