diff options
author | Chris Lattner <sabre@nondot.org> | 2003-10-09 20:31:18 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-10-09 20:31:18 +0000 |
commit | 93cb392a33ae8aa6f6700ace993f6812dfd26a5b (patch) | |
tree | a22a5a5dfc0f28e31cb3235112af3d06cd2db995 /llvm/lib/ExecutionEngine/Interpreter | |
parent | a89c91020c4860adcec46458a1e8fb9b1297767d (diff) | |
download | bcm5719-llvm-93cb392a33ae8aa6f6700ace993f6812dfd26a5b.tar.gz bcm5719-llvm-93cb392a33ae8aa6f6700ace993f6812dfd26a5b.zip |
Do not read past the end of the contained type list
llvm-svn: 8986
Diffstat (limited to 'llvm/lib/ExecutionEngine/Interpreter')
-rw-r--r-- | llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp b/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp index 1a28e46d8d0..aa6679f6e1a 100644 --- a/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp +++ b/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp @@ -57,8 +57,8 @@ static ExFunc lookupFunction(const Function *M) { // composite function name should be. std::string ExtName = "lle_"; const FunctionType *MT = M->getFunctionType(); - for (unsigned i = 0; const Type *Ty = MT->getContainedType(i); ++i) - ExtName += getTypeID(Ty); + for (unsigned i = 0, e = MT->getNumContainedTypes(); i != e; ++i) + ExtName += getTypeID(MT->getContainedType(i)); ExtName += "_" + M->getName(); //std::cout << "Tried: '" << ExtName << "'\n"; |