tests/kms_plane_scaling: Fix out-of-bound array access
PATCH 1/1 tests/kms_plane_scaling: Fix out-of-bound array access
When k == n_planes - 1, we will try to access planes[n_planes], which is out of bounds. Fix this.
Reported-by Luca Coelho <[email protected]>
Signed-off-by Swati Sharma <[email protected]>
--- tests/kms_plane_scaling.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tests/kms_plane_scaling.c +1 -1
@@ -744,7 +744,7 @@ test_planes_scaling_combo(data_t *d, int w1, int h1, int w2, int h2,igt_assert (0 ); } -for (int k =0 ; k < display->pipes[pipe].n_planes; k++) { +for (int k =0 ; k < display->pipes[pipe].n_planes -1 ; k++) {igt_plane_t *p1, *p2; p1 = &display->pipes[pipe].planes[k];
Signature · 1 line
2.25.1