Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 722b9dea authored by Vikash Garodia's avatar Vikash Garodia
Browse files

msm: vidc: Fix out of bound array access



With loop counter being declared as unsigned, it happens
to be that when none of the loop exit criteria is met,
the counter gets updated with a very high positive
value corresponding to unsigned -1. Due to this the
loop runs through and invalid memory is accessed. This
lead to unhandled page faults.
Declaring the loop counter as signed ensures that the
loop does not run beyond the intended iterations.

Change-Id: Ibe7b420f25fc2a6859655c76df8332663b903473
Signed-off-by: default avatarVikash Garodia <vgarodia@codeaurora.org>
parent 7427cd00
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment