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

Fix crash when comparing ContractPermissionDescriptor #3396

Merged
merged 5 commits into from
Jul 5, 2024

Conversation

chenzhitong
Copy link
Member

Fix crash when comparing ContractPermissionDescriptor

var descriptor1 = ContractPermissionDescriptor.CreateWildcard();
var descriptor2 = ContractPermissionDescriptor.Create(LedgerContract.NEO.Hash);
var result = descriptor1.Equals(descriptor2);

This code will crash because of the null reference exception

Copy link
Member

@AnnaShaleva AnnaShaleva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch, have you faced this bug in a real network?

@NGDAdmin NGDAdmin merged commit 2c20820 into neo-project:master Jul 5, 2024
7 checks passed
Jim8y added a commit to Jim8y/neo that referenced this pull request Jul 5, 2024
…ests

* 'snapshot-tests' of github.com:Jim8y/neo:
  Fix crash when comparing ContractPermissionDescriptor (neo-project#3396)
  `DeprecatedIn` for events (neo-project#3362)
  Fix download tips (neo-project#3395)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants