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

blockmanager: avoid dereferencing nil checkpoint hash #105

Merged

Conversation

halseth
Copy link
Contributor

@halseth halseth commented Oct 19, 2018

This commit fixes a nil pointer dereference that could happen for nets
having no checkpoints, where we would attempt to dereference the pointer
to a nil hash.

We fix this by not dereferenceing before the height has been checked.

Comments are updated to reflect the change.

This commit fixes a nil pointer dereference that could happen for nets
having no checkpoints, where we would attempt to dereference the pointer
to a nil hash.

We fix this by not dereferenceing before the height has been checked.

Comments are updated to reflect the change.
@coveralls
Copy link

coveralls commented Oct 21, 2018

Coverage Status

Coverage increased (+0.2%) to 69.825% when pulling 328dc45 on halseth:checkpoint-nil-pointer-dereference into 8018ab7 on lightninglabs:master.

Copy link
Member

@Roasbeef Roasbeef left a comment

Choose a reason for hiding this comment

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

LGTM 🎎

@Roasbeef Roasbeef merged commit 23d294f into lightninglabs:master Oct 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants