From 5ce84693d3ce28b07f7405210de05e983a6f250c Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Mon, 20 Jul 2020 17:46:03 +0800 Subject: [PATCH] tools/mksyscall: Fix warning: '__builtin_strncpy' specified bound 256 equals destination size Signed-off-by: Xiang Xiao --- tools/mksyscall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/mksyscall.c b/tools/mksyscall.c index 5444d2bd78..4ad0b874f1 100644 --- a/tools/mksyscall.c +++ b/tools/mksyscall.c @@ -158,7 +158,7 @@ static void get_fieldname(const char *arg, char *fieldname) */ pstart++; - strncpy(fieldname, pstart, MAX_PARMSIZE); + strncpy(fieldname, pstart, MAX_PARMSIZE - 1); return; } }