From: Kyle McMartin <kmcmarti@redhat.com>
To: Chen Gang <gang.chen@asianux.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: Thu, 30 May 2013 11:35:51 -0400 [thread overview]
Message-ID: <20130530153551.GN19205@redacted.bos.redhat.com> (raw)
In-Reply-To: <51A6A8F3.2030200@asianux.com>
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!
Acked-by: Kyle McMartin <kyle@mcmartin.ca>
next prev parent reply other threads:[~2013-05-30 15:36 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 [this message]
2013-06-03 8:55 ` Chen Gang
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=20130530153551.GN19205@redacted.bos.redhat.com \
--to=kmcmarti@redhat.com \
--cc=deller@gmx.de \
--cc=gang.chen@asianux.com \
--cc=gregkh@linuxfoundation.org \
--cc=jejb@parisc-linux.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox