File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed
Sources/WasmKit/Execution Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -277,6 +277,9 @@ extension StoreAllocator {
277277 switch ( importEntry. descriptor, external) {
278278 case let ( . function( typeIndex) , . function( externalFunc) ) :
279279 let type = externalFunc. type
280+ guard typeIndex < module. types. count else {
281+ throw ValidationError ( " Function type index out of bounds " )
282+ }
280283 guard engine. internType ( module. types [ Int ( typeIndex) ] ) == type else {
281284 throw ImportError . incompatibleImportType
282285 }
Original file line number Diff line number Diff line change @@ -22,8 +22,6 @@ final class SpectestTests: XCTestCase {
2222 path: Self . testPaths,
2323 include: [ ] ,
2424 exclude: [
25- " func.wast " ,
26- " func_ptrs.wast " ,
2725 " global.wast " ,
2826 " if.wast " ,
2927 " imports.wast " ,
You can’t perform that action at this time.
0 commit comments