We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7505f0a commit be16d78Copy full SHA for be16d78
Sources/WasmKit/Translator.swift
@@ -378,6 +378,9 @@ struct InstructionTranslator: InstructionVisitor {
378
let types: [ValueType]
379
380
func type(of localIndex: UInt32) throws -> ValueType {
381
+ guard Int(localIndex) < types.count else {
382
+ throw TranslationError("Local index \(localIndex) is out of range")
383
+ }
384
return self.types[Int(localIndex)]
385
}
386
0 commit comments