summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorInki Dae <inki.dae@samsung.com>2018-09-10 16:05:08 +0900
committerInki Dae <inki.dae@samsung.com>2018-09-10 16:05:08 +0900
commitcbe3fa6a61d740310aef7c666138bd7ec7ce99f7 (patch)
treed2075d57306747cbde2727399fc1026c2e3576f8
parent6c6d8a97b8697071d1775cd7d348949bdcb46e8d (diff)
downloadlibdrm-cbe3fa6a61d740310aef7c666138bd7ec7ce99f7.tar.gz
libdrm-cbe3fa6a61d740310aef7c666138bd7ec7ce99f7.tar.bz2
libdrm-cbe3fa6a61d740310aef7c666138bd7ec7ce99f7.zip
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 eb6b7205..0ecdd089 100644
--- a/tests/ipptest/fimc-ipp_v2.c
+++ b/tests/ipptest/fimc-ipp_v2.c
@@ -176,7 +176,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);
@@ -193,7 +193,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;