From: kgene.kim@samsung.com (Kukjin Kim)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] ARM: plat-samsung: using vsnprintf instead of vsprintf for the limit buffer length 256
Date: Fri, 25 Jan 2013 10:29:42 -0800 [thread overview]
Message-ID: <013d01cdfb29$f3595000$da0bf000$@samsung.com> (raw)
In-Reply-To: <50FE0D8B.7010908@asianux.com>
Chen Gang wrote:
>
>
> the buff is 256 limited, so need use vsnprintf instead of vsprintf
>
> Signed-off-by: Chen Gang <gang.chen@asianux.com>
> Cc: Ben Dooks <ben@fluff.org>
> ---
> arch/arm/plat-samsung/pm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm/plat-samsung/pm.c b/arch/arm/plat-samsung/pm.c
> index 1507028..d896add 100644
> --- a/arch/arm/plat-samsung/pm.c
> +++ b/arch/arm/plat-samsung/pm.c
> @@ -51,7 +51,7 @@ void s3c_pm_dbg(const char *fmt, ...)
> char buff[256];
>
> va_start(va, fmt);
> - vsprintf(buff, fmt, va);
> + vsnprintf(buff, sizeof(buff), fmt, va);
> va_end(va);
>
> printascii(buff);
> --
> 1.7.10.4
Applied, thanks.
- Kukjin
prev parent reply other threads:[~2013-01-25 18:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-22 3:54 [PATCH v2] ARM: plat-samsung: using vsnprintf instead of vsprintf for the limit buffer length 256 Chen Gang
2013-01-25 18:29 ` Kukjin Kim [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='013d01cdfb29$f3595000$da0bf000$@samsung.com' \
--to=kgene.kim@samsung.com \
--cc=linux-arm-kernel@lists.infradead.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