mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 06:58:05 +02:00
egl/wayland: fix oob buffer access during buffer_fds clean up
After iterating through the number of planes in the above for loop i is more than the number of planes which corresponds to the size of the buffer_fds array. Fixes:967b9ad084("egl/wayland: for prime, allocate linear_copy from display GPU VRAM") Signed-off-by: David Redondo <kde@david-redondo.de> Reviewed-by: Simon Ser <contact@emersion.fr> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22496> (cherry picked from commiteb7e906886)
This commit is contained in:
parent
61cfafda57
commit
8687ef15a3
2 changed files with 3 additions and 3 deletions
|
|
@ -598,7 +598,7 @@
|
|||
"description": "egl/wayland: fix oob buffer access during buffer_fds clean up",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "967b9ad084ecf28f639aeb21b5bdf76813e65a8a"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1121,10 +1121,10 @@ get_back_bo(struct dri2_egl_surface *dri2_surf)
|
|||
&strides[0],
|
||||
&offsets[0],
|
||||
dri2_surf->back);
|
||||
do {
|
||||
for (i = 0; i < num_planes; ++i) {
|
||||
if (buffer_fds[i] != -1)
|
||||
close(buffer_fds[i]);
|
||||
} while (--i >= 0);
|
||||
}
|
||||
dri2_dpy->image->destroyImage(linear_copy_display_gpu_image);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue