Ensure buffer is nul-terminated.
MFC after: 2 weeks
This commit is contained in:
parent
1cc7e361a6
commit
1e4da04f06
@ -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