From df20c3943ab4e20055f8e731f112aa9fd8d66068 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Thu, 4 Mar 2010 00:53:52 -0800 Subject: [PATCH] glsl: Add assert to check input to strcmp. --- src/mesa/shader/slang/slang_builtin.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/shader/slang/slang_builtin.c b/src/mesa/shader/slang/slang_builtin.c index f0659a8d8bb..791e751526d 100644 --- a/src/mesa/shader/slang/slang_builtin.c +++ b/src/mesa/shader/slang/slang_builtin.c @@ -182,6 +182,7 @@ lookup_statevar(const char *var, GLint index1, GLint index2, const char *field, tokens[1] = 0; else tokens[1] = 1; + assert(field); if (strcmp(field, "emission") == 0) { tokens[2] = STATE_EMISSION; } -- 2.30.2