Skip to content

Commit

Permalink
Prevent overflowing the process_info array
Browse files Browse the repository at this point in the history
Fixes #9
  • Loading branch information
Tyriar committed Sep 16, 2017
1 parent bc27e50 commit 592c945
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/process.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ void GetRawProcessList(ProcessInfo process_info[1024], uint32_t* process_count)
strcpy(process_info[*process_count].name, process_entry.szExeFile);
(*process_count)++;
}
} while (Process32Next(snapshot_handle, &process_entry));
} while (*process_count < 1024 && Process32Next(snapshot_handle, &process_entry));
}
CloseHandle(snapshot_handle);
}

0 comments on commit 592c945

Please sign in to comment.