diff options
author | alan-baker <alanbaker@google.com> | 2021-07-29 12:56:58 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-29 12:56:58 -0400 |
commit | 5737dbb068da91274de9728aab8b4bf27c52f38d (patch) | |
tree | 4662399c539719e910d500ce7cc7729ba84b6461 /source/val/validate_extensions.cpp | |
parent | 17bf4437677cae8190e89ee52bc33b61686e8e7c (diff) | |
download | SPIRV-Tools-5737dbb068da91274de9728aab8b4bf27c52f38d.tar.gz |
Fix validator crash (#4418)
Fixes #4411
* Some GLSL.std.450 validation didn't handle an operand without a type
Diffstat (limited to 'source/val/validate_extensions.cpp')
-rw-r--r-- | source/val/validate_extensions.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/val/validate_extensions.cpp b/source/val/validate_extensions.cpp index b5b98783..1f7b9563 100644 --- a/source/val/validate_extensions.cpp +++ b/source/val/validate_extensions.cpp @@ -812,7 +812,7 @@ spv_result_t ValidateExtInst(ValidationState_t& _, const Instruction* inst) { for (uint32_t operand_index = 4; operand_index < num_operands; ++operand_index) { const uint32_t operand_type = _.GetOperandTypeId(inst, operand_index); - if (!_.IsIntScalarOrVectorType(operand_type)) { + if (!operand_type || !_.IsIntScalarOrVectorType(operand_type)) { return _.diag(SPV_ERROR_INVALID_DATA, inst) << ext_inst_name() << ": " << "expected all operands to be int scalars or vectors"; |