diff options
author | peter <peter@FreeBSD.org> | 2003-01-22 00:34:22 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2003-01-22 00:34:22 +0000 |
commit | 568a1c8f9648e8a9985e3432f11440dfd5f0151e (patch) | |
tree | 905b6cc35813c08f7ff738d1c1378f2be4401dfd /sbin | |
parent | aecb199acfbb6634f3874a30a1bed19632af5594 (diff) | |
download | FreeBSD-src-568a1c8f9648e8a9985e3432f11440dfd5f0151e.zip FreeBSD-src-568a1c8f9648e8a9985e3432f11440dfd5f0151e.tar.gz |
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.)
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/sysctl/sysctl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sbin/sysctl/sysctl.c b/sbin/sysctl/sysctl.c index 927e7a4..d843d84 100644 --- a/sbin/sysctl/sysctl.c +++ b/sbin/sysctl/sysctl.c @@ -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) |