]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Do not segfault when procstat -f or procstat -v is called on a process not
authormarcus <marcus@FreeBSD.org>
Fri, 19 Dec 2008 06:50:15 +0000 (06:50 +0000)
committermarcus <marcus@FreeBSD.org>
Fri, 19 Dec 2008 06:50:15 +0000 (06:50 +0000)
commit0abe5b951a7aaf746e27a5f530787ec38ea88fac
tree3bf1db210e6cd2863aba11fbfa3c4420e85a0395
parent2368f18ac465224da2b90e0037f39d141448e123
Do not segfault when procstat -f or procstat -v is called on a process not
owned by the current user.  If kinfo_getfile() or kinfo_getvmmap() return
NULL, simply exit, and do not try and derefernce the memory.

Reviewed by: peter
Approved by: peter
usr.bin/procstat/procstat_files.c
usr.bin/procstat/procstat_vm.c