于 2013年03月08日 19:11, David Laight 写道:
Using strlcpy() also stops someone else having to check it
again in a few years time.
yes.
:-)
--
Chen Gang
Asianux Corporation
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
On Fri, 2013-03-08 at 11:38 +0800, Chen Gang wrote:
originally I did not notice src buf len and dest buf len are the same.
so origianlly, it is not a bug issue, it is only for beautify code.
and now, using strcpy is better.
Being the same len doesn't mean it's safe to use
On Fri, 2013-03-08 at 11:38 +0800, Chen Gang wrote:
originally I did not notice src buf len and dest buf len are the same.
so origianlly, it is not a bug issue, it is only for beautify code.
and now, using strcpy is better.
Being the same len doesn't mean it's safe to use strcpy ...
于 2013年03月08日 11:46, Benjamin Herrenschmidt 写道:
strcpy is indeed safe but using strlcpy doesn't hurt does it ?
really it is: using strlcpy doesn't hurt.
the comments and subject of original commit are not quite precision:
it is not for a bug issue (originally I say it is for bug issue)
On Fri, 2013-03-08 at 12:23 +0800, Chen Gang wrote:
really it is: using strlcpy doesn't hurt.
the comments and subject of original commit are not quite precision:
it is not for a bug issue (originally I say it is for bug issue)
it is really for beautify code.
can I send a
于 2013年03月08日 12:33, Benjamin Herrenschmidt 写道:
On Fri, 2013-03-08 at 12:23 +0800, Chen Gang wrote:
really it is: using strlcpy doesn't hurt.
the comments and subject of original commit are not quite precision:
it is not for a bug issue (originally I say it is for bug issue)
On Fri, 2013-03-08 at 12:40 +0800, Chen Gang wrote:
is it correct ?
Yes, the code is fine as it is now.
Ben.
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev
于 2013年03月08日 13:08, Benjamin Herrenschmidt 写道:
Yes, the code is fine as it is now.
ok, thanks.
--
Chen Gang
Asianux Corporation
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev