Skip to content

fix(nodes): prevent nil pointers in node parsing #23

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

Merged
merged 3 commits into from
Jan 7, 2023

Conversation

pauloavelar
Copy link
Owner

@pauloavelar pauloavelar commented Jan 6, 2023

Summary

  • Add constructors for Node that fill the decoder reference
  • Add safe getter for binary parser (ByteOrder) to prevent nil pointer panics

Checklist

  • I have added code related to the library scope that does not focus on a specific use case.
  • I have not added a new dependency, or the code owners have agreed to it.
  • I have written tests for the new code, or the existing tests cover it completely.
  • I have not added // nolint comments to the code to fix linter issues.
  • I have not changed configuration files (CI, lint, templates, etc) without authorization.

@codecov
Copy link

codecov bot commented Jan 6, 2023

Codecov Report

Base: 100.00% // Head: 100.00% // No change to project coverage 👍

Coverage data is based on head (cf34830) compared to base (fd30700).
Patch coverage: 100.00% of modified lines in pull request are covered.

❗ Current head cf34830 differs from pull request most recent head cc2225f. Consider uploading reports for the commit cc2225f to get more accurate results

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #23   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            7         7           
  Lines          160       180   +20     
=========================================
+ Hits           160       180   +20     
Impacted Files Coverage Δ
tlv/decoder.go 100.00% <100.00%> (ø)
tlv/node.go 100.00% <100.00%> (ø)
tlv/standard.go 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@pauloavelar pauloavelar marked this pull request as ready for review January 7, 2023 00:53
@pauloavelar pauloavelar merged commit 3a2f172 into main Jan 7, 2023
@pauloavelar pauloavelar deleted the fix/node-creation branch January 7, 2023 01:16
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.

1 participant