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 nil-ponter in TUI #388

Merged
merged 1 commit into from
Mar 17, 2017
Merged

Fix nil-ponter in TUI #388

merged 1 commit into from
Mar 17, 2017

Conversation

kotakanbe
Copy link
Member

$ ./vuls tui
INFO[0000] Validating config...
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x4132d06]

goroutine 1 [running]:
panic(0x4710bc0, 0xc4200121b0)
        /usr/local/go/src/runtime/panic.go:500 +0x1a1
github.com/future-architect/vuls/vendor/github.com/Sirupsen/logrus.(*Entry).Debugf(0x0, 0x47c980a, 0x1b, 0xc42017ce30, 0x1, 0x1)
        /Users/kotakanbe/go/src/github.com/future-architect/vuls/vendor/github.com/Sirupsen/logrus/entry.go:177 +0x26
github.com/future-architect/vuls/cveapi.cvedictClient.FetchCveDetailsFromCveDB(0x0, 0x0, 0xc42036c580, 0x5, 0x8, 0xc42017d418, 0x6, 0x4, 0xc4200001a0, 0x0)
        /Users/kotakanbe/go/src/github.com/future-architect/vuls/cveapi/cve_client.go:137 +0xcd
github.com/future-architect/vuls/cveapi.cvedictClient.FetchCveDetails(0x0, 0x0, 0xc42036c580, 0x5, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0)
        /Users/kotakanbe/go/src/github.com/future-architect/vuls/cveapi/cve_client.go:75 +0xd6f
github.com/future-architect/vuls/models.ScanResult.FillCveDetail(0xed05c3e95, 0x3b978fe3, 0x4b28460, 0x0, 0x0, 0xc420370450, 0xb, 0xc42037044c, 0x4, 0xc420370460, ...)
        /Users/kotakanbe/go/src/github.com/future-architect/vuls/models/models.go:90 +0x353
github.com/future-architect/vuls/commands.fillCveInfoFromCveDB(0xed05c3e95, 0x3b978fe3, 0x4b28460, 0x0, 0x0, 0xc420370450, 0xb, 0xc42037044c, 0x4, 0xc420370460, ...)
        /Users/kotakanbe/go/src/github.com/future-architect/vuls/commands/util.go:170 +0x168
github.com/future-architect/vuls/commands.(*TuiCmd).Execute(0xc420367f80, 0x4af3140, 0xc4200123c0, 0xc420315980, 0x0, 0x0, 0x0, 0x1)
        /Users/kotakanbe/go/src/github.com/future-architect/vuls/commands/tui.go:147 +0x4c6
github.com/future-architect/vuls/vendor/github.com/google/subcommands.(*Commander).Execute(0xc420058070, 0x4af3140, 0xc4200123c0, 0x0, 0x0, 0x0, 0x0)
        /Users/kotakanbe/go/src/github.com/future-architect/vuls/vendor/github.com/google/subcommands/subcommands.go:141 +0x3a7
github.com/future-architect/vuls/vendor/github.com/google/subcommands.Execute(0x4af3140, 0xc4200123c0, 0x0, 0x0, 0x0, 0xc420370130)
        /Users/kotakanbe/go/src/github.com/future-architect/vuls/vendor/github.com/google/subcommands/subcommands.go:371 +0x5f
main.main()
        /Users/kotakanbe/go/src/github.com/future-architect/vuls/main.go:58 +0x361

What did you implement:

Closes #384

How did you implement it:

Initialize util.Log

How can we verify it:

./vuls tui

Todos:

You don't have to satisfy all of the following.

  • 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?: NO
Is it a breaking change?: NO

@kotakanbe kotakanbe merged commit 58afcfc into master Mar 17, 2017
@kotakanbe kotakanbe added the bug label Mar 24, 2017
@kotakanbe kotakanbe modified the milestone: v0.3.0 Mar 24, 2017
lapthorn pushed a commit to lapthorn/vuls that referenced this pull request May 11, 2017
@kotakanbe kotakanbe deleted the tui-nil-pointer branch June 27, 2017 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant