summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2012-04-23 17:12:04 -0700
committerEric Anholt <[email protected]>2012-05-04 14:00:32 -0700
commit3362c7d9b61462855f1e7d67da5d255de1b6ee7e (patch)
tree6b79bdcc41e8258b5f31ecdbd8f1ee69ef38f9fe /src
parentdc42910e98dc00760255cc4579da458de09175b9 (diff)
mesa: Prevent buffer underrun when handling MESA_GL_EXTENSION_OVERRIDE.
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/extensions.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
index 5f2c74a758e..a843a40925c 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;