mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 09:38:07 +02:00
meta: Avoid random memory access on error
Initialize drawFb to NULL in _mesa_meta_CopyImageSubData_uncompressed() if getting readFb fails uninitialized drawFb will cause randomness on cleanup. Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> Reviewed-by: Eduardo Lima Mitev <elima@igalia.com> Reviewed-by: Chad Versace <chad.versace@intel.com>
This commit is contained in:
parent
cea3a7e615
commit
51632d6f27
1 changed files with 1 additions and 1 deletions
|
|
@ -168,7 +168,7 @@ _mesa_meta_CopyImageSubData_uncompressed(struct gl_context *ctx,
|
|||
GLuint src_view_texture = 0;
|
||||
struct gl_texture_image *src_view_tex_image;
|
||||
struct gl_framebuffer *readFb;
|
||||
struct gl_framebuffer *drawFb;
|
||||
struct gl_framebuffer *drawFb = NULL;
|
||||
bool success = false;
|
||||
GLbitfield mask;
|
||||
GLenum status, attachment;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue