diff options
author | Matt Turner <[email protected]> | 2016-05-16 12:48:00 -0700 |
---|---|---|
committer | Matt Turner <[email protected]> | 2016-05-18 11:09:37 -0700 |
commit | b1e6d069daeda87cb7e14a45a0e4438cc0b399d0 (patch) | |
tree | 4c66c1c6c8bdd079dd087a4f60d04732442c561b | |
parent | 0a548eb56fba1ec7e32ea116d022327baaae8d21 (diff) |
spirv: Properly size the src[] array.
Operations like nir_op_bitfield_insert have four arguments, and Coverity
isn't privy to the fact that 4-argument operations aren't possible here,
so it thinks this can lead to memory corruption. Just increase the size
of the array to quell any fears.
-rw-r--r-- | src/compiler/spirv/spirv_to_nir.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c index c65f971ad79..56948bf8a3f 100644 --- a/src/compiler/spirv/spirv_to_nir.c +++ b/src/compiler/spirv/spirv_to_nir.c @@ -1036,7 +1036,7 @@ vtn_handle_constant(struct vtn_builder *b, SpvOp opcode, unsigned bit_size = glsl_get_bit_size(val->const_type); - nir_const_value src[3]; + nir_const_value src[4]; assert(count <= 7); for (unsigned i = 0; i < count - 4; i++) { nir_constant *c = |