From 1808adc2dec5179c5e0ae1f97974cda14915e161 Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Wed, 27 Jan 2021 01:28:29 +1100 Subject: [PATCH] [host] app: fix possible string overflow --- host/src/app.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/host/src/app.c b/host/src/app.c index 92d3021e..466b94fa 100644 --- a/host/src/app.c +++ b/host/src/app.c @@ -467,7 +467,7 @@ int app_main(int argc, char * argv[]) .magic = KVMFR_MAGIC, .version = KVMFR_VERSION, }; - strncpy(udata.hostver, BUILD_VERSION, sizeof(udata.hostver)); + strncpy(udata.hostver, BUILD_VERSION, sizeof(udata.hostver)-1); LGMP_STATUS status; if ((status = lgmpHostInit(shmDev.mem, shmDev.size, &app.lgmp,