mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-24 11:29:10 +00:00
21687047cf
processes match the given criteria. Since revision 1.60 of malloc.c, malloc() and friends return an invalid pointer when given a size of 0. kvm_getprocs() uses sysctl() with a NULL oldp argument to get an initial size, but does not check whether it's 0 before passing it to realloc() (via _kvm_realloc()). Before the aforementioned malloc() change, this resulted in a minimal allocation made and a valid poitner returned, but now results in an invalid, but non-NULL, pointer being returned. When this is passed to sysctl(), the latter returns EFAULT (as it should). |
||
---|---|---|
.. | ||
kvm_alpha.c | ||
kvm_amd64.c | ||
kvm_file.c | ||
kvm_geterr.3 | ||
kvm_getfiles.3 | ||
kvm_getloadavg.3 | ||
kvm_getloadavg.c | ||
kvm_getprocs.3 | ||
kvm_getswapinfo.3 | ||
kvm_getswapinfo.c | ||
kvm_i386.c | ||
kvm_ia64.c | ||
kvm_nlist.3 | ||
kvm_open.3 | ||
kvm_private.h | ||
kvm_proc.c | ||
kvm_read.3 | ||
kvm_sparc64.c | ||
kvm_sparc.c | ||
kvm.3 | ||
kvm.c | ||
kvm.h | ||
Makefile |