Fix off-by-one vulnerability of listpids

This commit is contained in:
Mohammad Reza 2022-01-26 11:01:08 +03:30 committed by GitHub
parent b200aff852
commit 13460c09f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -922,7 +922,7 @@ void List_Process_Ids(void)
sprintf(msg, "%d\r\n", pid_count);
WriteFile(out, msg, strlen(msg), &len, NULL);
for (i = 0; i <= pid_count; ++i) {
for (i = 0; i < pid_count; ++i) {
sprintf(msg, "%d\r\n", pids[i]);
WriteFile(out, msg, strlen(msg), &len, NULL);
}