[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1433418121-9434-1-git-send-email-sudipm.mukherjee@gmail.com>
Date: Thu, 4 Jun 2015 17:12:01 +0530
From: Sudip Mukherjee <sudipm.mukherjee@...il.com>
To: Thomas Petazzoni <thomas.petazzoni@...e-electrons.com>,
Noralf Trønnes <noralf@...nnes.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
Sudip Mukherjee <sudipm.mukherjee@...il.com>
Subject: [PATCH] staging: fbtft: fix out of bound access
size of str is 16, but in snprintf the size was mentioned as 128.
Signed-off-by: Sudip Mukherjee <sudip@...torindia.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists