Mesa (7.10): mesa: Guard against null pointer deref in fbo validation
Brian Paul
brianp at kemper.freedesktop.org
Tue Apr 5 13:54:22 UTC 2011
Module: Mesa
Branch: 7.10
Commit: 33129c040b4774ce7ea5b78bb7271e478bf4472e
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=33129c040b4774ce7ea5b78bb7271e478bf4472e
Author: Brian Paul <brianp at vmware.com>
Date: Tue Apr 5 07:54:04 2011 -0600
mesa: Guard against null pointer deref in fbo validation
This matches the behaviour below when numSamples is compared.
At least with the gallium state tracker this can actually occur if st_render_texture fails.
Signed-off-by: Brian Paul <brianp at vmware.com>
(cherry picked from commit c7339d42c603048c0f89276da6576647c4421ba0)
---
src/mesa/main/fbobject.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index 42fab1b..a98200e 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -690,7 +690,7 @@ _mesa_test_framebuffer_completeness(struct gl_context *ctx,
continue;
}
- if (numSamples < 0) {
+ if (att->Renderbuffer && numSamples < 0) {
/* first buffer */
numSamples = att->Renderbuffer->NumSamples;
}
More information about the mesa-commit
mailing list