Re: [PATCH] arch: parisc: kernel: using strlcpy() instead of strcpy()

2013-06-03 Thread Chen Gang
On 05/30/2013 11:35 PM, Kyle McMartin wrote: > On Thu, May 30, 2013 at 09:18:43AM +0800, Chen Gang wrote: >> > >> > 'boot_args' is an input args, and 'boot_command_line' has a fix length. >> > >> > So need use strlcpy() instead of strcpy() to avoid memory overflow. >> > > This is basically

Re: [PATCH] arch: parisc: kernel: using strlcpy() instead of strcpy()

2013-06-03 Thread Chen Gang
On 05/30/2013 11:06 PM, Wang YanQing wrote: > What about add > boot_command_line[COMMAND_LINE_SIZE - 1] = '\0'; > to protect the following another strcpy? > > " > strcpy(command_line, boot_command_line); > " If the 'dest' length is not less than COMMAND_LINE_SIZE, the strlcpy() will copy

Re: [PATCH] arch: parisc: kernel: using strlcpy() instead of strcpy()

2013-06-03 Thread Chen Gang
On 05/30/2013 11:06 PM, Wang YanQing wrote: What about add boot_command_line[COMMAND_LINE_SIZE - 1] = '\0'; to protect the following another strcpy? strcpy(command_line, boot_command_line); If the 'dest' length is not less than COMMAND_LINE_SIZE, the strlcpy() will copy

Re: [PATCH] arch: parisc: kernel: using strlcpy() instead of strcpy()

2013-06-03 Thread Chen Gang
On 05/30/2013 11:35 PM, Kyle McMartin wrote: On Thu, May 30, 2013 at 09:18:43AM +0800, Chen Gang wrote: 'boot_args' is an input args, and 'boot_command_line' has a fix length. So need use strlcpy() instead of strcpy() to avoid memory overflow. This is basically impossible, since

Re: [PATCH] arch: parisc: kernel: using strlcpy() instead of strcpy()

2013-05-30 Thread Kyle McMartin
On Thu, May 30, 2013 at 09:18:43AM +0800, Chen Gang wrote: > > 'boot_args' is an input args, and 'boot_command_line' has a fix length. > > So need use strlcpy() instead of strcpy() to avoid memory overflow. > This is basically impossible, since boot_args is fixed in size by palo, initialized

Re: [PATCH] arch: parisc: kernel: using strlcpy() instead of strcpy()

2013-05-30 Thread Wang YanQing
On Thu, May 30, 2013 at 09:18:43AM +0800, Chen Gang wrote: > > 'boot_args' is an input args, and 'boot_command_line' has a fix length. > > So need use strlcpy() instead of strcpy() to avoid memory overflow. > > > Signed-off-by: Chen Gang > --- > arch/parisc/kernel/setup.c |3 ++- > 1

Re: [PATCH] arch: parisc: kernel: using strlcpy() instead of strcpy()

2013-05-30 Thread Wang YanQing
On Thu, May 30, 2013 at 09:18:43AM +0800, Chen Gang wrote: 'boot_args' is an input args, and 'boot_command_line' has a fix length. So need use strlcpy() instead of strcpy() to avoid memory overflow. Signed-off-by: Chen Gang gang.c...@asianux.com --- arch/parisc/kernel/setup.c |3

Re: [PATCH] arch: parisc: kernel: using strlcpy() instead of strcpy()

2013-05-30 Thread Kyle McMartin
On Thu, May 30, 2013 at 09:18:43AM +0800, Chen Gang wrote: 'boot_args' is an input args, and 'boot_command_line' has a fix length. So need use strlcpy() instead of strcpy() to avoid memory overflow. This is basically impossible, since boot_args is fixed in size by palo, initialized to

[PATCH] arch: parisc: kernel: using strlcpy() instead of strcpy()

2013-05-29 Thread Chen Gang
'boot_args' is an input args, and 'boot_command_line' has a fix length. So need use strlcpy() instead of strcpy() to avoid memory overflow. Signed-off-by: Chen Gang --- arch/parisc/kernel/setup.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git

[PATCH] arch: parisc: kernel: using strlcpy() instead of strcpy()

2013-05-29 Thread Chen Gang
'boot_args' is an input args, and 'boot_command_line' has a fix length. So need use strlcpy() instead of strcpy() to avoid memory overflow. Signed-off-by: Chen Gang gang.c...@asianux.com --- arch/parisc/kernel/setup.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git