Skip to content

Commit

Permalink
Check length.
Browse files Browse the repository at this point in the history
  • Loading branch information
winder committed Dec 18, 2024
1 parent 61e6409 commit 5687bd0
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions core/capabilities/ccip/ocrimpls/contract_transmitter.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 5687bd0

Please sign in to comment.