[PATCH] staging: fbtft: fix out of bound access

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Signed-off-by: Sudip Mukherjee <sudip@xxxxxxxxxxxxxxx>
---
 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

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux