Skip to content

Commit

Permalink
fix: nil check on PCR measurement comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
natesales committed Nov 20, 2024
1 parent 997896b commit 59f7790
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/models/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ type Measurements struct {
}

func (m *Measurements) Equals(other *Measurements) bool {
return m.PCR0 == other.PCR0 && m.PCR1 == other.PCR1 && m.PCR2 == other.PCR2
return (m != nil && other != nil) && m.PCR0 == other.PCR0 && m.PCR1 == other.PCR1 && m.PCR2 == other.PCR2
}

0 comments on commit 59f7790

Please sign in to comment.