diff options
author | Jason Ekstrand <jason.ekstrand@intel.com> | 2015-05-08 09:42:05 -0700 |
---|---|---|
committer | Jason Ekstrand <jason.ekstrand@intel.com> | 2015-05-08 17:29:15 -0700 |
commit | e0cfe59c37245d8555202a12b9b29866894d6d18 (patch) | |
tree | 3349a98b95b1afd7ab7772594d81605176f8da70 /src/glsl/nir | |
parent | 13facfbd5b067daedc972c1a4fb2f2142fcbc190 (diff) |
nir/search: Assert that variable id's are in range
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Diffstat (limited to 'src/glsl/nir')
-rw-r--r-- | src/glsl/nir/nir_search.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/glsl/nir/nir_search.c b/src/glsl/nir/nir_search.c index 713dc4eedff..1c171f2a729 100644 --- a/src/glsl/nir/nir_search.c +++ b/src/glsl/nir/nir_search.c @@ -98,6 +98,7 @@ match_value(const nir_search_value *value, nir_alu_instr *instr, unsigned src, case nir_search_value_variable: { nir_search_variable *var = nir_search_value_as_variable(value); + assert(var->variable < NIR_SEARCH_MAX_VARIABLES); if (state->variables_seen & (1 << var->variable)) { if (!nir_srcs_equal(state->variables[var->variable].src, |