mesa: Prevent buffer underrun when handling MESA_GL_EXTENSION_OVERRIDE.

This commit is contained in:
Eric Anholt 2012-04-23 17:12:04 -07:00
parent dc42910e98
commit 3362c7d9b6
1 changed files with 1 additions and 1 deletions

View File

@ -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;