mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
Zero buffers. Seatbelt against sysctl(3) returning non-NUL terminated
string data.
This commit is contained in:
parent
8f6a80b791
commit
9f98e452c3
1 changed files with 2 additions and 0 deletions
|
|
@ -501,6 +501,8 @@ show_var(int *oid, int nlen)
|
|||
u_int kind;
|
||||
int (*func)(int, void *);
|
||||
|
||||
bzero(buf, BUFSIZ);
|
||||
bzero(name, BUFSIZ);
|
||||
qoid[0] = 0;
|
||||
memcpy(qoid + 2, oid, nlen * sizeof(int));
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue