public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: fbtft: fix out of bound access
@ 2015-06-04 11:42 Sudip Mukherjee
  2015-06-04 12:12 ` Joe Perches
  2015-06-04 12:36 ` Dan Carpenter
  0 siblings, 2 replies; 5+ messages in thread
From: Sudip Mukherjee @ 2015-06-04 11:42 UTC (permalink / raw)
  To: Thomas Petazzoni, Noralf Trønnes, Greg Kroah-Hartman
  Cc: devel, linux-kernel, Sudip Mukherjee

size of str is 16, but in snprintf the size was mentioned as 128.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
---
 drivers/staging/fbtft/fbtft-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/fbtft/fbtft-core.c b/drivers/staging/fbtft/fbtft-core.c
index ce64521..0af84b5 100644
--- a/drivers/staging/fbtft/fbtft-core.c
+++ b/drivers/staging/fbtft/fbtft-core.c
@@ -1096,7 +1096,7 @@ static int fbtft_init_display_dt(struct fbtft_par *par)
 			/* make debug message */
 			msg[0] = '\0';
 			for (j = 0; j < i; j++) {
-				snprintf(str, 128, " %02X", buf[j]);
+				snprintf(str, 16, " %02X", buf[j]);
 				strcat(msg, str);
 			}
 			fbtft_par_dbg(DEBUG_INIT_DISPLAY, par,
-- 
1.8.1.2


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

end of thread, other threads:[~2015-06-04 12:47 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-04 11:42 [PATCH] staging: fbtft: fix out of bound access Sudip Mukherjee
2015-06-04 12:12 ` Joe Perches
2015-06-04 12:21   ` Sudip Mukherjee
2015-06-04 12:36 ` Dan Carpenter
2015-06-04 12:47   ` Sudip Mukherjee

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox