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
b7191db17b
commit
06cee96130
@ -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