All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chen Gang <gang.chen@asianux.com>
To: Kyle McMartin <kmcmarti@redhat.com>
Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>,
	Helge Deller <deller@gmx.de>,
	udknight@gmail.com, Greg KH <gregkh@linuxfoundation.org>,
	Parisc List <linux-parisc@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Linux-Arch <linux-arch@vger.kernel.org>
Subject: Re: [PATCH] arch: parisc: kernel: using strlcpy() instead of strcpy()
Date: Mon, 03 Jun 2013 16:55:42 +0800	[thread overview]
Message-ID: <51AC5A0E.4080408@asianux.com> (raw)
In-Reply-To: <20130530153551.GN19205@redacted.bos.redhat.com>

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 boot_args is fixed in size by palo,
> initialized to zero, and length checked in the bootloader. It's also
> only 256+4 bytes compared to the 1024 bytes set aside for
> boot_command_line.
> 
> That said, it's harmless to use strlcpy here, and obviously (more)
> correct. Thanks!
> 

OK, thanks.

> Acked-by: Kyle McMartin <kyle@mcmartin.ca>
> 
> 

Thank you. :-)


-- 
Chen Gang

Asianux Corporation

      reply	other threads:[~2013-06-03  8:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-30  1:18 [PATCH] arch: parisc: kernel: using strlcpy() instead of strcpy() Chen Gang
2013-05-30 15:06 ` Wang YanQing
2013-06-03  8:50   ` Chen Gang
2013-05-30 15:35 ` Kyle McMartin
2013-06-03  8:55   ` Chen Gang [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=51AC5A0E.4080408@asianux.com \
    --to=gang.chen@asianux.com \
    --cc=deller@gmx.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=jejb@parisc-linux.org \
    --cc=kmcmarti@redhat.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-parisc@vger.kernel.org \
    --cc=udknight@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.