mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Fix what I think is an off-by-one in certain worst-case scenarios
caused by rev 1.45. (eg: the estimate being exactly half of the result.)
This commit is contained in:
parent
b8701b5430
commit
661b2c1683
1 changed files with 1 additions and 1 deletions
|
|
@ -552,7 +552,7 @@ show_var(int *oid, int nlen)
|
|||
i = sysctl(oid, nlen, 0, &j, 0, 0);
|
||||
j += j; /* we want to be sure :-) */
|
||||
|
||||
val = alloca(j);
|
||||
val = alloca(j + 1);
|
||||
len = j;
|
||||
i = sysctl(oid, nlen, val, &len, 0, 0);
|
||||
if (i || !len)
|
||||
|
|
|
|||
Loading…
Reference in a new issue