Skip to content

Commit

Permalink
fix(decl/loader): fix potential nil ptr deref in context validation
Browse files Browse the repository at this point in the history
Signed-off-by: Leonardo Di Giovanna <[email protected]>
Co-authored-by: Aldo Lacuku <[email protected]>
  • Loading branch information
ekoops and alacuku committed Nov 25, 2024
1 parent f5ba67d commit 42caec1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/test/loader/loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@ func (t *Test) validateNameUniqueness() error {

// validateContext validates that names used for test resources and steps are unique.
func (t *Test) validateContext() error {
if t.Context == nil {
return nil
}

processes := t.Context.Processes
processesLen := len(processes)
if processesLen <= 1 {
Expand Down

0 comments on commit 42caec1

Please sign in to comment.