From: David Brown <davidb@codeaurora.org>
To: Chen Gang <gang.chen@asianux.com>, Stephen Boyd <sboyd@codeaurora.org>
Cc: dwalker@fifo99.com, bryanh@codeaurora.org,
Russell King - ARM Linux <linux@arm.linux.org.uk>,
linux-arm-kernel@lists.infradead.org,
linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH] ARM:mach-msm: seting tail NUL after strncpy
Date: Wed, 30 Jan 2013 13:33:51 -0800 [thread overview]
Message-ID: <8ya4nhywe2o.fsf@huya.qualcomm.com> (raw)
In-Reply-To: <5108A913.6080304@asianux.com> (Chen Gang's message of "Wed, 30 Jan 2013 13:01:07 +0800")
Chen Gang <gang.chen@asianux.com> writes:
> temp need NUL terminated, or next ptr may cause issue.
>
> Signed-off-by: Chen Gang <gang.chen@asianux.com>
> ---
> arch/arm/mach-msm/clock-debug.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/arch/arm/mach-msm/clock-debug.c
> b/arch/arm/mach-msm/clock-debug.c
> index 4886404..bdca900 100644
> --- a/arch/arm/mach-msm/clock-debug.c
> +++ b/arch/arm/mach-msm/clock-debug.c
> @@ -105,6 +105,8 @@ int __init clock_debug_add(struct clk *clock)
> return -ENOMEM;
>
> strncpy(temp, clock->dbg_name, ARRAY_SIZE(temp)-1);
> + temp[ARRAY_SIZE(temp)-1] = '\0';
> +
> for (ptr = temp; *ptr; ptr++)
I believe that Stephen Boyd is putting some significant work into this
code. Stephen, can you see if this bug is still in your current
version of the code, and make sure that it is fixed there?
Thanks,
David
--
sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation
WARNING: multiple messages have this Message-ID (diff)
From: davidb@codeaurora.org (David Brown)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM:mach-msm: seting tail NUL after strncpy
Date: Wed, 30 Jan 2013 13:33:51 -0800 [thread overview]
Message-ID: <8ya4nhywe2o.fsf@huya.qualcomm.com> (raw)
In-Reply-To: <5108A913.6080304@asianux.com> (Chen Gang's message of "Wed, 30 Jan 2013 13:01:07 +0800")
Chen Gang <gang.chen@asianux.com> writes:
> temp need NUL terminated, or next ptr may cause issue.
>
> Signed-off-by: Chen Gang <gang.chen@asianux.com>
> ---
> arch/arm/mach-msm/clock-debug.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/arch/arm/mach-msm/clock-debug.c
> b/arch/arm/mach-msm/clock-debug.c
> index 4886404..bdca900 100644
> --- a/arch/arm/mach-msm/clock-debug.c
> +++ b/arch/arm/mach-msm/clock-debug.c
> @@ -105,6 +105,8 @@ int __init clock_debug_add(struct clk *clock)
> return -ENOMEM;
>
> strncpy(temp, clock->dbg_name, ARRAY_SIZE(temp)-1);
> + temp[ARRAY_SIZE(temp)-1] = '\0';
> +
> for (ptr = temp; *ptr; ptr++)
I believe that Stephen Boyd is putting some significant work into this
code. Stephen, can you see if this bug is still in your current
version of the code, and make sure that it is fixed there?
Thanks,
David
--
sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation
next prev parent reply other threads:[~2013-01-30 21:33 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-30 5:01 [PATCH] ARM:mach-msm: seting tail NUL after strncpy Chen Gang
2013-01-30 5:01 ` Chen Gang
2013-01-30 9:19 ` Bjørn Mork
2013-01-30 9:19 ` Bjørn Mork
2013-01-30 10:46 ` Chen Gang
2013-01-30 10:46 ` Chen Gang
2013-01-30 11:12 ` [PATCH v2] ARM:mach-msm: using strlcpy instead lof strncpy Chen Gang
2013-01-30 11:12 ` Chen Gang
2013-01-30 21:33 ` David Brown [this message]
2013-01-30 21:33 ` [PATCH] ARM:mach-msm: seting tail NUL after strncpy David Brown
2013-01-30 21:59 ` Stephen Boyd
2013-01-30 21:59 ` Stephen Boyd
2013-02-01 1:12 ` Chen Gang
2013-02-01 1:12 ` 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=8ya4nhywe2o.fsf@huya.qualcomm.com \
--to=davidb@codeaurora.org \
--cc=bryanh@codeaurora.org \
--cc=dwalker@fifo99.com \
--cc=gang.chen@asianux.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=sboyd@codeaurora.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 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.