summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorInki Dae <inki.dae@samsung.com>2018-09-10 16:05:08 +0900
committerSeung-Woo Kim <sw0312.kim@samsung.com>2019-04-25 17:59:27 +0900
commit9a36c58c4fc1528ec21f0e4455fefd98625ff5f5 (patch)
treee4b8969a902bdc48fc0be0d496e8cba74fc0973b
parentdd975d858b90ba87920c346a7f3ec85858bf75c0 (diff)
downloadlibdrm-9a36c58c4fc1528ec21f0e4455fefd98625ff5f5.tar.gz
libdrm-9a36c58c4fc1528ec21f0e4455fefd98625ff5f5.tar.bz2
libdrm-9a36c58c4fc1528ec21f0e4455fefd98625ff5f5.zip
ipptest: fix PROC_USE.VULNERABLE issue
Fixed a PROC_USE.VULNERABLE issue reported by SVACE. Using sprinf is unsave so it should be replaced with snprintf. Change-Id: Idc65775008ed125efd82877d766256a91ec7e773 Signed-off-by: Inki Dae <inki.dae@samsung.com>
-rw-r--r--tests/ipptest/fimc-ipp_v2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/ipptest/fimc-ipp_v2.c b/tests/ipptest/fimc-ipp_v2.c
index 4819db5b..a6875827 100644
--- a/tests/ipptest/fimc-ipp_v2.c
+++ b/tests/ipptest/fimc-ipp_v2.c
@@ -172,7 +172,7 @@ void fimc_v2_m2m_set_mode(struct device *dev, struct connector *c, int count,
switch (display) {
case IPP_CMD_M2M_FILE:
/* For src image write file */
- sprintf(filename, RESULT_PATH "fimc_m2m_org_src.bmp");
+ snprintf(filename, sizeof(filename), RESULT_PATH "fimc_m2m_org_src.bmp");
util_write_bmp(filename, usr_addr1[0],
src_sz.hsize, src_sz.vsize);
@@ -189,7 +189,7 @@ void fimc_v2_m2m_set_mode(struct device *dev, struct connector *c, int count,
usec[j] = (end.tv_sec - begin.tv_sec) * 1000000 +
(end.tv_usec - begin.tv_usec);
- sprintf(filename, RESULT_PATH "fimc_m2m_dst%d.bmp", j);
+ snprintf(filename, sizeof(filename), RESULT_PATH "fimc_m2m_dst%d.bmp", j);
util_write_bmp(filename, usr_addr2[0], def_sz.hsize, def_sz.vsize);
}
break;