mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 03:08:05 +02:00
st/va: Fix potential buffer overread
VASurfaceAttribExternalBuffers.pitches is indexed by plane. Current implementation only supports single plane layout. Reviewed-by: Kristian H. Kristensen <hoegsberg@chromium.org> Reviewed-by: Leo Liu <leo.liu@amd.com>
This commit is contained in:
parent
deba56accf
commit
893808006a
1 changed files with 1 additions and 1 deletions
|
|
@ -574,7 +574,7 @@ suface_from_external_memory(VADriverContextP ctx, vlVaSurface *surface,
|
|||
memset(&whandle, 0, sizeof(struct winsys_handle));
|
||||
whandle.type = DRM_API_HANDLE_TYPE_FD;
|
||||
whandle.handle = memory_attibute->buffers[index];
|
||||
whandle.stride = memory_attibute->pitches[index];
|
||||
whandle.stride = memory_attibute->pitches[0];
|
||||
|
||||
resource = pscreen->resource_from_handle(pscreen, &res_templ, &whandle,
|
||||
PIPE_HANDLE_USAGE_READ_WRITE);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue