mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Undo the bogus gethostname() change from r299709.
The "- 1" is there specifically to enable checking for NUL termination. I should also admit the rest change was mostly cosmetic and the overruns can't occur in practice: still I leave them to pacify static analyzers. Pointed out by: bde
This commit is contained in:
parent
0150b85a1c
commit
c8aa42a2da
1 changed files with 1 additions and 1 deletions
|
|
@ -196,7 +196,7 @@ main(int argc, char *argv[])
|
|||
if (goodgroup != NULL || goodhosts != NULL)
|
||||
Mflag = 1;
|
||||
|
||||
if (gethostname(hostname, sizeof(hostname)) < 0)
|
||||
if (gethostname(hostname, sizeof(hostname) - 1) < 0)
|
||||
err(1, "gethostname");
|
||||
self.l_bak = &self;
|
||||
self.l_fwd = &self;
|
||||
|
|
|
|||
Loading…
Reference in a new issue