Don't forget to null-terminate string we got from sysctl (f.e. in 'A' format).

Stack garbadge may be printed otherwise.
This commit is contained in:
Andrey A. Chernov 2002-05-08 23:49:19 +00:00
parent cc8371bc71
commit 76d3dc5297
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=96234

View File

@ -518,7 +518,7 @@ show_var(int *oid, int nlen)
fwrite(val, 1, len, stdout);
return (0);
}
val[len] = '\0';
fmt = buf;
oidfmt(oid, nlen, fmt, &kind);
p = val;