mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 11:28:05 +02:00
nouveau: Fix bugs in nouveau_video_buffer
Double free and array overflow, even if only 2 members are used the last one needs to be set to NULL explicitly. Signed-off-by: Maarten Lankhorst <m.b.lankhorst@gmail.com
This commit is contained in:
parent
2eafd07323
commit
ebe7c687ce
2 changed files with 3 additions and 4 deletions
|
|
@ -835,7 +835,6 @@ nouveau_video_buffer_create(struct pipe_context *pipe,
|
|||
|
||||
error:
|
||||
nouveau_video_buffer_destroy(&buffer->base);
|
||||
FREE(buffer);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,10 +7,10 @@
|
|||
struct nouveau_video_buffer {
|
||||
struct pipe_video_buffer base;
|
||||
unsigned num_planes;
|
||||
struct pipe_resource *resources[2];
|
||||
struct pipe_sampler_view *sampler_view_planes[2];
|
||||
struct pipe_resource *resources[3];
|
||||
struct pipe_sampler_view *sampler_view_planes[3];
|
||||
struct pipe_sampler_view *sampler_view_components[3];
|
||||
struct pipe_surface *surfaces[2];
|
||||
struct pipe_surface *surfaces[3];
|
||||
};
|
||||
|
||||
struct nouveau_decoder {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue