From f589e913a7c29d771eb03cad57be1877d9581013 Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Wed, 7 Dec 2011 00:10:17 +0100 Subject: [PATCH] Fix end of range check to not read beyond the allocation. The counter j is equal to fTeamCount if no matching team was found in the team array. Therefore using it as an index into the team array was invalid. --- src/apps/processcontroller/MemoryBarMenu.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/apps/processcontroller/MemoryBarMenu.cpp b/src/apps/processcontroller/MemoryBarMenu.cpp index 3c2df35e6b..f773d981dd 100644 --- a/src/apps/processcontroller/MemoryBarMenu.cpp +++ b/src/apps/processcontroller/MemoryBarMenu.cpp @@ -129,7 +129,7 @@ MemoryBarMenu::Pulse() j++; } - if (infos.team_info.team != fTeamList[j]) { + if (j == fTeamCount) { // new team team_info info; j = 0;