[Mesa-dev] [PATCH 4/5] mesa: Prevent buffer underrun when handling MESA_GL_EXTENSION_OVERRIDE.
Eric Anholt
eric at anholt.net
Tue Apr 24 10:25:05 PDT 2012
---
src/mesa/main/extensions.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
index 5f2c74a..a843a40 100644
--- a/src/mesa/main/extensions.c
+++ b/src/mesa/main/extensions.c
@@ -754,7 +754,7 @@ get_extension_override( struct gl_context *ctx )
/* Remove trailing space. */
len = strlen(extra_exts);
- if (extra_exts[len - 1] == ' ')
+ if (len > 0 && extra_exts[len - 1] == ' ')
extra_exts[len - 1] = '\0';
return extra_exts;
--
1.7.10
More information about the mesa-dev
mailing list