Skip to content
Snippets Groups Projects
Commit 5f711670 authored by Swati2 Sharma's avatar Swati2 Sharma
Browse files

tests/kms_plane_scaling: Fix out-of-bound array access


With this fix we are solving 2 issues. Firstly, the
planes_scaling_combo() tests were leaving one scaler assigned
after running sub-test with two consecutive planes because
one scaler was getting reused in the next run. So with this fix
scaler is not reused since we won't have any common plane.

Secondly, when k == n_planes - 1, we were trying to access
planes[n_planes], which led to array out of bounds error. So, with
this fix, this issue is fixed too.

v2: -fix condition if n_planes is not even (JP)

Suggested-by: default avatarLuca Coelho <luciano.coelho@intel.com>
Suggested-by: default avatarJuha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reported-by: default avatarLuca Coelho <luciano.coelho@intel.com>
Signed-off-by: default avatarSwati Sharma <swati2.sharma@intel.com>
Reviewed-by: default avatarJuha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: default avatarLuca Coelho <luciano.coelho@intel.com>
parent 9cd66804
No related branches found
No related tags found
No related merge requests found
Pipeline #834630 passed
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment