Mesa (master): meta: Avoid random memory access on error
Chad Versace
chadversary at kemper.freedesktop.org
Tue Apr 26 20:52:49 UTC 2016
Module: Mesa
Branch: master
Commit: 51632d6f27860c4e217a34fbb23864dfa56c4c48
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=51632d6f27860c4e217a34fbb23864dfa56c4c48
Author: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>
Date: Sat Apr 16 22:26:22 2016 +0300
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 at gmail.com>
Reviewed-by: Eduardo Lima Mitev <elima at igalia.com>
Reviewed-by: Chad Versace <chad.versace at intel.com>
---
src/mesa/drivers/common/meta_copy_image.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mesa/drivers/common/meta_copy_image.c b/src/mesa/drivers/common/meta_copy_image.c
index 9402a46..ebea428 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;
More information about the mesa-commit
mailing list