Skip to content

fix: nil pointer when no match for any OS #1401

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 2 commits into from
Feb 23, 2022
Merged

fix: nil pointer when no match for any OS #1401

merged 2 commits into from
Feb 23, 2022

Conversation

kotakanbe
Copy link
Member

@kotakanbe kotakanbe commented Feb 23, 2022

What did you implement:

fix: nil pointer if no match for any OS

# mv /etc/debian_version /etc/debian_version.bak
# ./vuls scan --debug
[Feb 23 00:15:48]  INFO [localhost] vuls-v0.19.4-build-20220223_001011_7d8a24e
[Feb 23 00:15:48]  INFO [localhost] Start scanning
[Feb 23 00:15:48]  INFO [localhost] config: /go/src/github.com/future-architect/vuls.clean/config.toml
...
[Feb 23 00:15:48] DEBUG [localhost] Panic: runtime error: invalid memory address or nil pointer dereference on localhost

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Confirmed that no nil pointer occurs.

Checklist:

  • Write tests
  • Write documentation
  • Check that there aren't other open pull requests for the same issue/feature
  • Format your source code by make fmt
  • Pass the test by make test
  • Provide verification config / commands
  • Enable "Allow edits from maintainers" for this PR
  • Update the messages below

Is this ready for review?: YES

@kotakanbe kotakanbe changed the title fix: nil pointer if no match for any OS fix: nil pointer when no match for any OS Feb 23, 2022
@kotakanbe kotakanbe merged commit 2fbc0a0 into master Feb 23, 2022
@kotakanbe kotakanbe deleted the fix-scanner branch February 23, 2022 22:58
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