linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: plat-samsung: using vsnprintf instead of vsprintf for the limit buffer length 256
@ 2013-01-21 10:25 Chen Gang
  2013-01-21 13:56 ` Ben Dooks
  2013-01-21 16:00 ` Russell King - ARM Linux
  0 siblings, 2 replies; 5+ messages in thread
From: Chen Gang @ 2013-01-21 10:25 UTC (permalink / raw)
  To: linux-arm-kernel


  the buff size is 256, so need use vsnprintf instead of vsprintf.

Signed-off-by: Chen Gang <gang.chen@asianux.com>
---
 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..8d07b45 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, 256, fmt, va);
 	va_end(va);
 
 	printascii(buff);
-- 
1.7.10.4

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

end of thread, other threads:[~2013-01-22  1:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-21 10:25 [PATCH] ARM: plat-samsung: using vsnprintf instead of vsprintf for the limit buffer length 256 Chen Gang
2013-01-21 13:56 ` Ben Dooks
2013-01-22  1:00   ` Chen Gang
2013-01-21 16:00 ` Russell King - ARM Linux
2013-01-22  1:00   ` Chen Gang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).