summaryrefslogtreecommitdiff
path: root/ppsthread.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2016-03-28 16:32:36 -0400
committerEric S. Raymond <esr@thyrsus.com>2016-03-28 16:32:36 -0400
commite44410df8283326eddacc5a2331613ab704d586f (patch)
tree3472a71543e1cdede9db153beca39c491060f591 /ppsthread.c
parente1f37d8f135cce21deed20da2395aea18bf8ef00 (diff)
downloadgpsd-e44410df8283326eddacc5a2331613ab704d586f.tar.gz
Coverity cleanup.
Diffstat (limited to 'ppsthread.c')
-rw-r--r--ppsthread.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ppsthread.c b/ppsthread.c
index dfb55be5..b0b5303a 100644
--- a/ppsthread.c
+++ b/ppsthread.c
@@ -190,7 +190,7 @@ static int init_kernel_pps(struct inner_context_t *inner_context)
* strlcpy() is not available.)
*/
if (strncmp(pps_thread->devicename, "/dev/pps", 8) == 0)
- (void)strncpy(path, pps_thread->devicename, sizeof(path));
+ (void)strncpy(path, pps_thread->devicename, sizeof(path)-1);
else {
char pps_num = '\0'; /* /dev/pps[pps_num] is our device */
size_t i; /* to match type of globbuf.gl_pathc */