diff options
author | Drew Davenport <[email protected]> | 2018-04-24 17:01:32 -0600 |
---|---|---|
committer | Leo Liu <[email protected]> | 2018-04-26 11:16:05 -0400 |
commit | 893808006a6f48c1efd8e8101a58ab2dac8dc370 (patch) | |
tree | fc27f935808fa7bcef445738a18ca864421c1416 | |
parent | deba56accf4e1f8fc025f34f6cbc069285f76838 (diff) |
st/va: Fix potential buffer overread
VASurfaceAttribExternalBuffers.pitches is indexed by
plane. Current implementation only supports single plane layout.
Reviewed-by: Kristian H. Kristensen <[email protected]>
Reviewed-by: Leo Liu <[email protected]>
-rw-r--r-- | src/gallium/state_trackers/va/surface.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/va/surface.c b/src/gallium/state_trackers/va/surface.c index 86041369444..6fe21b89e58 100644 --- a/src/gallium/state_trackers/va/surface.c +++ b/src/gallium/state_trackers/va/surface.c @@ -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); |