Zero buffers. Seatbelt against sysctl(3) returning non-NUL terminated
string data.
This commit is contained in:
parent
8f6a80b791
commit
9f98e452c3
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=144997
@ -501,6 +501,8 @@ show_var(int *oid, int nlen)
|
|||||||
u_int kind;
|
u_int kind;
|
||||||
int (*func)(int, void *);
|
int (*func)(int, void *);
|
||||||
|
|
||||||
|
bzero(buf, BUFSIZ);
|
||||||
|
bzero(name, BUFSIZ);
|
||||||
qoid[0] = 0;
|
qoid[0] = 0;
|
||||||
memcpy(qoid + 2, oid, nlen * sizeof(int));
|
memcpy(qoid + 2, oid, nlen * sizeof(int));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user