diff options
author | Juha-Pekka Heikkila <[email protected]> | 2016-04-16 22:26:22 +0300 |
---|---|---|
committer | Chad Versace <[email protected]> | 2016-04-26 14:54:02 -0700 |
commit | 51632d6f27860c4e217a34fbb23864dfa56c4c48 (patch) | |
tree | 8026d0b355e0df1522dd503148f7e688f65ecaab /src/mesa/drivers/common | |
parent | cea3a7e6153b69b34bb8a8484b27463ad123bcc2 (diff) |
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 <[email protected]>
Reviewed-by: Eduardo Lima Mitev <[email protected]>
Reviewed-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/mesa/drivers/common')
-rw-r--r-- | src/mesa/drivers/common/meta_copy_image.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/drivers/common/meta_copy_image.c b/src/mesa/drivers/common/meta_copy_image.c index 9402a4652eb..ebea4285c9a 100644 --- a/src/mesa/drivers/common/meta_copy_image.c +++ b/src/mesa/drivers/common/meta_copy_image.c @@ -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; |