Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Execution State] Payload.Equals() can crash if p is nil, and it should return true when comparing empty payload and nil payload #2125

Closed
fxamacker opened this issue Mar 9, 2022 · 0 comments · Fixed by #2126
Assignees
Labels
Bug Something isn't working Execution Cadence Execution Team

Comments

@fxamacker
Copy link
Member

Problem

There appears to be two bugs:

  • func (p *Payload) Equals(other *Payload) bool can crash if p is nil. Although this scenario seems to be unlikely to happen the way the function is currently used, it can become a problem if we use this function differently.

  • nil payload doesn't equal empty payload, but they should be equal.

Solution

These are being fixed as part of upcoming PR resolving issues #1747 and #1748.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Execution Cadence Execution Team
Projects
None yet
1 participant