rfelker writes in Bug 742: make sure string is null terminated after calling gethostname
This commit is contained in:
parent
294254ce6b
commit
dce17c6268
@ -96,6 +96,7 @@ void print_login_issue(const char *issue_file, const char *tty)
|
||||
|
||||
case 'h':
|
||||
gethostname(buf, sizeof(buf) - 1);
|
||||
buf[sizeof(buf) - 1] = '\0';
|
||||
break;
|
||||
|
||||
case 'l':
|
||||
|
Loading…
Reference in New Issue
Block a user