From 91b70e23d680304101ae7832602d827b2a921dce Mon Sep 17 00:00:00 2001 From: sfng Date: Fri, 2 Jan 2026 10:42:44 +0800 Subject: [PATCH] parse inner Instructions out of range --- parser.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/parser.go b/parser.go index b5003de..486fcdc 100644 --- a/parser.go +++ b/parser.go @@ -2,6 +2,7 @@ package pump_parser import ( "errors" + "log" "github.com/gagliardetto/solana-go" "github.com/shopspring/decimal" @@ -73,6 +74,10 @@ func (tx *Tx) Parser() error { // unknown program, parser inner instructions innerLength := len(innersMap[i].Instructions) for j := 1; j <= innerLength; { + if j <= 0 || j > innerLength { + log.Printf("inner instruction index is out if range, block: %d, tx: %s, outerIndex: %d, innerIndex: %d", tx.Block, tx.GetTxHash(), ii, j) + break + } innerInstr := innersMap[i].Instructions[j-1] innerProgramAccount := accountList[innerInstr.ProgramIDIndex]