Mesa (master): mesa: Guard against null pointer deref in fbo validation
Brian Paul
brianp at kemper.freedesktop.org
Tue Apr 5 13:53:39 UTC 2011
Module: Mesa
Branch: master
Commit: c7339d42c603048c0f89276da6576647c4421ba0
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c7339d42c603048c0f89276da6576647c4421ba0
Author: Fabian Bieler <der.fabe at gmx.net>
Date: Tue Apr 5 07:51:01 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>
---
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 f0065ad..eb1fef5 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -746,7 +746,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