mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-02 12:20:51 +00:00
Fix a "bug" in sysctl(8). Limit the length when we print a string from
the kernel rather than ignoring the length and keeping on going till we finally hit a \0 character in the buffer.
This commit is contained in:
parent
e324564167
commit
9866352ec7
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=106829
@ -533,7 +533,7 @@ show_var(int *oid, int nlen)
|
||||
case 'A':
|
||||
if (!nflag)
|
||||
printf("%s%s", name, sep);
|
||||
printf("%s", p);
|
||||
printf("%.*s", len, p);
|
||||
return (0);
|
||||
|
||||
case 'I':
|
||||
|
Loading…
Reference in New Issue
Block a user