aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin
diff options
context:
space:
mode:
authorSuraj Jitindar Singh <[email protected]>2016-07-11 14:17:31 +1000
committerMichael Ellerman <[email protected]>2016-07-14 20:26:22 +1000
commita7d6392866e9777cb287ad194ce8eca00737066f (patch)
tree1d6dba9b22132ce5c15c994855689f9ee8d1c2dd /tools/perf/scripts/python/bin
parent0f2b3442fb850626d50a9d7e533c9f859ef15e6a (diff)
powerpc/crash: Rearrange loop condition to avoid out of bounds array access
The array crash_shutdown_handles[] has size CRASH_HANDLER_MAX, thus when we loop over the elements of the list we check crash_shutdown_handles[i] && i < CRASH_HANDLER_MAX. However this means that when we increment i to CRASH_HANDLER_MAX we will perform an out of bound array access checking the first condition before exiting on the second condition. To avoid the out of bounds access, simply reorder the loop conditions. Fixes: 1d1451655bad ("powerpc: Add array bounds checking to crash_shutdown_handlers") Signed-off-by: Suraj Jitindar Singh <[email protected]> Reviewed-by: Andrew Donnellan <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions