Skip to content

Commit e0fb3d7

Browse files
committed
fcntl36: Do not pass char* pointer to tst_res() fmt
The format string has to be constant, passing pointers directly is a bad practice that may result in security exploit and some build systems even do not produce packages if such warning is found in the compiler logs. Signed-off-by: Cyril Hrubis <[email protected]>
1 parent 28507e5 commit e0fb3d7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

testcases/kernel/syscalls/fcntl/fcntl36.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ static void test_fn(void *f0(void *), void *f1(void *),
300300
struct param p2[thread_cnt];
301301
unsigned char buf[write_size];
302302

303-
tst_res(TINFO, msg);
303+
tst_res(TINFO, "%s", msg);
304304

305305
if (tst_fill_file(fname, 1, write_size, thread_cnt + 1))
306306
tst_brk(TBROK, "Failed to create tst file");

0 commit comments

Comments
 (0)