diff options
Diffstat (limited to 'libntp/findconfig.c')
-rw-r--r-- | libntp/findconfig.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libntp/findconfig.c b/libntp/findconfig.c index 562c01764c3c..1785ff700395 100644 --- a/libntp/findconfig.c +++ b/libntp/findconfig.c @@ -22,7 +22,7 @@ FindConfig( struct utsname unamebuf; /* All keyed by initial target being a directory */ - (void) strcpy(result, base); + strlcpy(result, base, sizeof(result)); if (stat(result, &sbuf) == 0) { if (S_ISDIR(sbuf.st_mode)) { @@ -49,7 +49,9 @@ FindConfig( if (stat(result, &sbuf) == 0) { goto outahere; } else { - (void) strcpy(result, "/not/found"); + strlcpy(result, + "/not/found", + sizeof(result)); } } } |