From e13a41d91e75df7a5527a60b4c3c8ee2976dad14 Mon Sep 17 00:00:00 2001 From: Robert Foss Date: Wed, 1 Mar 2017 19:14:39 -0500 Subject: mesa: Avoid read of uninitialized variable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The is_color_attachement variable is later read when handling two separate error cases, where only one of the cases results in the variable being initialized. This can be avoided by giving the variable a safe default value. Coverity-Id: 1398631 Cc: mesa-stable@lists.freedesktop.org Signed-off-by: Robert Foss Reviewed-by: Ilia Mirkin Reviewed-by: Anuj Phogat Reviewed-by: Marek Olšák Reviewed-by: Emil Velikov (cherry picked from commit 88becf73022d780cfd0d7dbc5bb3911f8b0d2b11) --- src/mesa/main/fbobject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index 044bd635794..8148dac90cc 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -3628,7 +3628,7 @@ _mesa_get_framebuffer_attachment_parameter(struct gl_context *ctx, GLint *params, const char *caller) { const struct gl_renderbuffer_attachment *att; - bool is_color_attachment; + bool is_color_attachment = false; GLenum err; /* The error code for an attachment type of GL_NONE differs between APIs. -- cgit v1.2.3