mirror of
https://github.com/xzeldon/htop.git
synced 2024-12-23 22:55:46 +00:00
Specify correct MIB length
Could have resulted in a buffer overflow if the FreeBSD kernel returned more bytes than expected.
This commit is contained in:
parent
402e46bb82
commit
92258e99e6
@ -121,7 +121,7 @@ ProcessList* ProcessList_new(UsersTable* usersTable, Hashtable* pidWhiteList, ui
|
||||
len = sizeof(fpl->memZfsArc);
|
||||
if (sysctlbyname("kstat.zfs.misc.arcstats.size", &fpl->memZfsArc, &len,
|
||||
NULL, 0) == 0 && fpl->memZfsArc != 0) {
|
||||
sysctlnametomib("kstat.zfs.misc.arcstats.size", MIB_kstat_zfs_misc_arcstats_size, &len);
|
||||
len = 5; sysctlnametomib("kstat.zfs.misc.arcstats.size", MIB_kstat_zfs_misc_arcstats_size, &len);
|
||||
fpl->zfsArcEnabled = 1;
|
||||
} else {
|
||||
fpl->zfsArcEnabled = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user