mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Fix crash with a dotless hostname.
This commit is contained in:
parent
99ae1d3b25
commit
2ff3551a47
1 changed files with 1 additions and 1 deletions
|
|
@ -183,7 +183,7 @@ main(int argc, char *argv[])
|
|||
if (hostname == NULL) {
|
||||
hostname = hbuf;
|
||||
(void )gethostname(hbuf, MAXHOSTNAMELEN);
|
||||
*strchr(hostname, '.') = '\0';
|
||||
*strchrnul(hostname, '.') = '\0';
|
||||
}
|
||||
|
||||
/* log input line if appropriate */
|
||||
|
|
|
|||
Loading…
Reference in a new issue