mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
Fix a typical off-by-one error that can result in an unterminated string:
strncpy(dst, src, sizeof(dst)); by substituting the safer strlcpy() for strncpy(). X-Security: none (the source string isn't user-supplied)
This commit is contained in:
parent
58d6bdcbe0
commit
7a855803b9
1 changed files with 1 additions and 1 deletions
|
|
@ -466,7 +466,7 @@ main(int argc, char *argv[])
|
|||
if ((S_IXUSR & buf.st_mode) && (run_time <=now)) {
|
||||
if (isupper(queue) && (strcmp(batch_name,dirent->d_name) > 0)) {
|
||||
run_batch = 1;
|
||||
strncpy(batch_name, dirent->d_name, sizeof(batch_name));
|
||||
strlcpy(batch_name, dirent->d_name, sizeof(batch_name));
|
||||
batch_uid = buf.st_uid;
|
||||
batch_gid = buf.st_gid;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue