All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] ARM: plat-samsung: using vsnprintf instead of vsprintf for the limit buffer length 256
@ 2013-01-22  3:54 ` Chen Gang
  0 siblings, 0 replies; 4+ messages in thread
From: Chen Gang @ 2013-01-22  3:54 UTC (permalink / raw)
  To: kgene.kim, ben-linux, Russell King - ARM Linux
  Cc: Ben Dooks, linux-arm-kernel, linux-samsung-soc


  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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH v2] ARM: plat-samsung: using vsnprintf instead of vsprintf for the limit buffer length 256
@ 2013-01-22  3:54 ` Chen Gang
  0 siblings, 0 replies; 4+ messages in thread
From: Chen Gang @ 2013-01-22  3:54 UTC (permalink / raw)
  To: linux-arm-kernel


  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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* RE: [PATCH v2] ARM: plat-samsung: using vsnprintf instead of vsprintf for the limit buffer length 256
  2013-01-22  3:54 ` Chen Gang
@ 2013-01-25 18:29   ` Kukjin Kim
  -1 siblings, 0 replies; 4+ messages in thread
From: Kukjin Kim @ 2013-01-25 18:29 UTC (permalink / raw)
  To: 'Chen Gang', ben-linux,
	'Russell King - ARM Linux'
  Cc: 'Ben Dooks', linux-arm-kernel, linux-samsung-soc

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v2] ARM: plat-samsung: using vsnprintf instead of vsprintf for the limit buffer length 256
@ 2013-01-25 18:29   ` Kukjin Kim
  0 siblings, 0 replies; 4+ messages in thread
From: Kukjin Kim @ 2013-01-25 18:29 UTC (permalink / raw)
  To: linux-arm-kernel

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-01-25 18:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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-22  3:54 ` Chen Gang
2013-01-25 18:29 ` Kukjin Kim
2013-01-25 18:29   ` Kukjin Kim

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.