validate: fix spec.Hooks nil dereference#361
Merged
Mashimiao merged 1 commit intoopencontainers:masterfrom Apr 12, 2017
Merged
Conversation
Fixes the following issue: panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x4ce0c9] goroutine 1 [running]: panic(0x5ad320, 0xc4200120a0) /usr/lib64/go/src/runtime/panic.go:500 +0x1a1 github.com/opencontainers/runtime-tools/validate.(*Validator).CheckHooks(0xc4200b77b8, 0xc420084d80, 0x0, 0x0) /home/abuild/rpmbuild/BUILD/go/src/github.com/opencontainers/runtime-tools/validate/validate.go:203 +0x89 github.com/opencontainers/runtime-tools/validate.(*Validator).CheckAll(0xc4200b77b8, 0x26, 0x0, 0xc4200aa000) /home/abuild/rpmbuild/BUILD/go/src/github.com/opencontainers/runtime-tools/validate/validate.go:109 +0x582 main.glob..func2(0xc4200a2140, 0x0, 0x20000c4200a2140) /home/abuild/rpmbuild/BUILD/go/src/github.com/opencontainers/runtime-tools/cmd/oci-runtime-tool/validate.go:28 +0x107 github.com/opencontainers/runtime-tools/vendor/github.com/urfave/cli.HandleAction(0x5a51a0, 0x5f7620, 0xc4200a2140, 0xc42005a300, 0x0) /home/abuild/rpmbuild/BUILD/go/src/github.com/opencontainers/runtime-tools/vendor/github.com/urfave/cli/app.go:485 +0xd4 github.com/opencontainers/runtime-tools/vendor/github.com/urfave/cli.Command.Run(0x5dcbc9, 0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x5e0f3c, 0x16, 0x0, ...) /home/abuild/rpmbuild/BUILD/go/src/github.com/opencontainers/runtime-tools/vendor/github.com/urfave/cli/command.go:193 +0xb96 github.com/opencontainers/runtime-tools/vendor/github.com/urfave/cli.(*App).Run(0xc420064d00, 0xc4200601b0, 0x3, 0x3, 0x0, 0x0) /home/abuild/rpmbuild/BUILD/go/src/github.com/opencontainers/runtime-tools/vendor/github.com/urfave/cli/app.go:250 +0x812 main.main() /home/abuild/rpmbuild/BUILD/go/src/github.com/opencontainers/runtime-tools/cmd/oci-runtime-tool/main.go:32 +0x2fe Signed-off-by: Aleksa Sarai <asarai@suse.de>
Contributor
1 similar comment
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes the following issue:
Signed-off-by: Aleksa Sarai asarai@suse.de