Ensure buffer is nul-terminated.
MFC after: 2 weeks
This commit is contained in:
parent
17962d0222
commit
1e3059d959
@ -103,7 +103,7 @@ hasquota(struct fstab *fs, int type, char *qfnamep, int qfbufsize)
|
||||
return (0);
|
||||
}
|
||||
if (cp) {
|
||||
strncpy(qfnamep, cp, qfbufsize);
|
||||
strlcpy(qfnamep, cp, qfbufsize);
|
||||
} else {
|
||||
(void)snprintf(qfnamep, qfbufsize, "%s/%s.%s", fs->fs_file,
|
||||
QUOTAFILENAME, qfextension[type]);
|
||||
|
Loading…
Reference in New Issue
Block a user