Skip to content

Commit c8e5e6f

Browse files
maxbachmannarcady-lunarg
authored andcommitted
fix use after free on vector resize
1 parent 45a36cb commit c8e5e6f

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

SPIRV/GlslangToSpv.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7270,7 +7270,8 @@ void TGlslangToSpvTraverser::translateArguments(const glslang::TIntermAggregate&
72707270
glslangArguments[i]->getAsSymbolNode() && glslangArguments[i-1]->getAsSymbolNode() &&
72717271
glslangArguments[i]->getAsSymbolNode()->getId() == glslangArguments[i-1]->getAsSymbolNode()->getId()) {
72727272
// Reuse the id if possible
7273-
arguments.push_back(arguments[i-1]);
7273+
spv::Id id = arguments[i-1];
7274+
arguments.push_back(id);
72747275
} else {
72757276
arguments.push_back(accessChainLoad(glslangArguments[i]->getAsTyped()->getType()));
72767277
}

0 commit comments

Comments
 (0)