From: Len Brown <lenb@kernel.org>
To: Johann Felix Soden <johfel@gmx.de>
Cc: linux-acpi@vger.kernel.org
Subject: Re: [PATCH] buffer array one byte too short in drivers/acpi/system.c
Date: Wed, 12 Mar 2008 18:23:24 -0400 [thread overview]
Message-ID: <200803121823.24755.lenb@kernel.org> (raw)
In-Reply-To: <1205250266.6930.15.camel@localhost>
On Tuesday 11 March 2008, Johann Felix Soden wrote:
> On Tuesday 11 March 2008, Len Brown wrote:
> > On Thursday 06 March 2008, Johann Felix Soden wrote:
> > > From: Johann Felix Soden <johfel@users.sourceforge.net>
> > >
> > > Since "ff_gbl_lock" has a length of 10 chars and is copied with sprintf to
> > > char buffer[10], there is a problem because of the closing zero byte. We
> > > need char buffer[11].
> >
> > "ff_gbl_lock" is 11 characters, and sprintf adds a null, so
> > buffer should be 12, yes?
>
> I have noticed my miscounting and have sent a new patch to you, Len
> Brown, some days ago. If it is needed anymore, below is the corrected
> patch again.
>
> ---
> From: Johann Felix Soden <johfel@users.sourceforge.net>
>
> Since "ff_gbl_lock" has a length of 11 chars and is copied with sprintf
> to char buffer[10], there is a problem. We need char buffer[12] because
> of the closing zero byte.
>
> Signed-off-by: Johann Felix Soden <johfel@users.sourceforge.net>
> ---
> drivers/acpi/system.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/acpi/system.c b/drivers/acpi/system.c
> index 55cf4c0..4749f37 100644
> --- a/drivers/acpi/system.c
> +++ b/drivers/acpi/system.c
> @@ -319,7 +319,7 @@ void acpi_irq_stats_init(void)
> goto fail;
>
> for (i = 0; i < num_counters; ++i) {
> - char buffer[10];
> + char buffer[12];
> char *name;
>
> if (i < num_gpes)
thanks for re-sending, i fixed the whitespace damage and checked it in.
BTW. the reason i didn't see your private re-send to my intel.com account
is b/c my intel.com mailbox is not the ideal place to send patches.
per http://www.lesswatts.org/projects/acpi/submitting-patches.php
I see patches send to the list, and patches sent to my kernel.org account.
thanks,
-Len
prev parent reply other threads:[~2008-03-12 22:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-06 14:30 [PATCH] buffer array one byte too short in drivers/acpi/system.c Johann Felix Soden
2008-03-11 7:05 ` Len Brown
2008-03-11 15:44 ` Johann Felix Soden
2008-03-12 22:23 ` Len Brown [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=200803121823.24755.lenb@kernel.org \
--to=lenb@kernel.org \
--cc=johfel@gmx.de \
--cc=linux-acpi@vger.kernel.org \
/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