From 5687bd0a8d9cab31a03421a349c99a5453504dc1 Mon Sep 17 00:00:00 2001 From: Will Winder Date: Wed, 18 Dec 2024 10:34:35 -0500 Subject: [PATCH] Check length. --- .../capabilities/ccip/ocrimpls/contract_transmitter.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/core/capabilities/ccip/ocrimpls/contract_transmitter.go b/core/capabilities/ccip/ocrimpls/contract_transmitter.go index c277c3a54a0..478bdaed3ad 100644 --- a/core/capabilities/ccip/ocrimpls/contract_transmitter.go +++ b/core/capabilities/ccip/ocrimpls/contract_transmitter.go @@ -70,9 +70,13 @@ func ToExecCalldata( // WARNING: Be careful if you change the data types. // Using a different type e.g. `type Foo [32]byte` instead of `[32]byte` // will trigger undefined chainWriter behavior, e.g. transactions submitted with wrong arguments. - info, err := ccipocr3.DecodeExecuteReportInfo(report.Info) - if err != nil { - return nil, err + var info ccipocr3.ExecuteReportInfo + if len(report.Info) != 0 { + var err error + info, err = ccipocr3.DecodeExecuteReportInfo(report.Info) + if err != nil { + return nil, err + } } return struct {