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
aecb199acf
commit
568a1c8f96
@ -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…
x
Reference in New Issue
Block a user