Fix stack-buffer-overflow in lldb_private::Host::FindProcesses

Found by the address sanitizer on GreenDragon:
http://green.lab.llvm.org/green/view/LLDB/job/lldb-sanitized/1628/console

llvm-svn: 349858
This commit is contained in:
Jonas Devlieghere 2018-12-20 23:45:26 +00:00
parent b1bbd5dca3
commit 6679bc15ca
1 changed files with 1 additions and 1 deletions

View File

@ -627,7 +627,7 @@ uint32_t Host::FindProcesses(const ProcessInstanceInfoMatch &match_info,
int mib[3] = {CTL_KERN, KERN_PROC, KERN_PROC_ALL};
size_t pid_data_size = 0;
if (::sysctl(mib, 4, NULL, &pid_data_size, NULL, 0) != 0)
if (::sysctl(mib, 3, NULL, &pid_data_size, NULL, 0) != 0)
return 0;
// Add a few extra in case a few more show up