mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
The source strings are from the password database which guarantees
that the data going into it is sane. Out of an abundance of caution, limit the string copies to prevent an overflow. CID: 1019035
This commit is contained in:
parent
ca23e64eb4
commit
90ceddb160
1 changed files with 2 additions and 2 deletions
|
|
@ -457,8 +457,8 @@ again:
|
|||
first = 0;
|
||||
if ((pwd = getpwnam(luser)) == NULL)
|
||||
return (-1);
|
||||
(void)strcpy(pbuf, pwd->pw_dir);
|
||||
(void)strcat(pbuf, "/.rhosts");
|
||||
(void)strlcpy(pbuf, pwd->pw_dir, sizeof(pbuf));
|
||||
(void)strlcat(pbuf, "/.rhosts", sizeof(pbuf));
|
||||
|
||||
/*
|
||||
* Change effective uid while opening .rhosts. If root and
|
||||
|
|
|
|||
Loading…
Reference in a new issue