forked from OSchip/llvm-project
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:
parent
b1bbd5dca3
commit
6679bc15ca
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue