Mesa (master): mesa: Prevent buffer underrun when handling MESA_GL_EXTENSION_OVERRIDE.
Eric Anholt
anholt at kemper.freedesktop.org
Fri May 4 21:21:28 UTC 2012
Module: Mesa
Branch: master
Commit: 3362c7d9b61462855f1e7d67da5d255de1b6ee7e
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=3362c7d9b61462855f1e7d67da5d255de1b6ee7e
Author: Eric Anholt <eric at anholt.net>
Date: Mon Apr 23 17:12:04 2012 -0700
mesa: Prevent buffer underrun when handling MESA_GL_EXTENSION_OVERRIDE.
---
src/mesa/main/extensions.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
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;
More information about the mesa-commit
mailing list