Re: [PATCH] drivers/tty/hvc: fixup original commit: 9276dfd27897a0b29d8b5814f39a1f82f56b6b6b

2013-03-09 Thread Chen Gang
于 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

RE: [PATCH] drivers/tty/hvc: fixup original commit: 9276dfd27897a0b29d8b5814f39a1f82f56b6b6b

2013-03-08 Thread David Laight
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

Re: [PATCH] drivers/tty/hvc: fixup original commit: 9276dfd27897a0b29d8b5814f39a1f82f56b6b6b

2013-03-07 Thread Benjamin Herrenschmidt
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 ...

Re: [PATCH] drivers/tty/hvc: fixup original commit: 9276dfd27897a0b29d8b5814f39a1f82f56b6b6b

2013-03-07 Thread Chen Gang
于 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)

Re: [PATCH] drivers/tty/hvc: fixup original commit: 9276dfd27897a0b29d8b5814f39a1f82f56b6b6b

2013-03-07 Thread 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) it is really for beautify code. can I send a

Re: [PATCH] drivers/tty/hvc: fixup original commit: 9276dfd27897a0b29d8b5814f39a1f82f56b6b6b

2013-03-07 Thread Chen Gang
于 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)

Re: [PATCH] drivers/tty/hvc: fixup original commit: 9276dfd27897a0b29d8b5814f39a1f82f56b6b6b

2013-03-07 Thread Benjamin Herrenschmidt
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

Re: [PATCH] drivers/tty/hvc: fixup original commit: 9276dfd27897a0b29d8b5814f39a1f82f56b6b6b

2013-03-07 Thread Chen Gang
于 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