From 13460c09f74e4e5dff1d30cd8a59f4916d363a4a Mon Sep 17 00:00:00 2001 From: Mohammad Reza <44086932+7eRoM@users.noreply.github.com> Date: Wed, 26 Jan 2022 11:01:08 +0330 Subject: [PATCH] Fix off-by-one vulnerability of listpids --- Sandboxie/apps/start/start.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sandboxie/apps/start/start.cpp b/Sandboxie/apps/start/start.cpp index 24bd9402..34f1cad2 100644 --- a/Sandboxie/apps/start/start.cpp +++ b/Sandboxie/apps/start/start.cpp @@ -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); }