Skip to content

Authentication (and other) errors cause segfault #1

Description

@prydin

When using the creategroup subcommand, authentication errors and other user errors cause nil-pointer references and segfaults.

Here is an example:

[ggc@prome-2n-dhcp71:~$ ./gghelper_linux creategroup -name test
CreateCore error: UnrecognizedClientException: The security token included in the request is invalid.
	status code: 403, request id: 846d2db5-0baf-11e8-8b00-a353ea141895
Created core 'test'
CreateCoreDefinition error: UnrecognizedClientException: The security token included in the request is invalid.
	status code: 403, request id: 84a9259f-0baf-11e8-8a0f-295e0f4132bf
Error: UnrecognizedClientException: The security token included in the request is invalid.
	status code: 403, request id: 84a9259f-0baf-11e8-8a0f-295e0f4132bf
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x70e7ee]

goroutine 1 [running]:
github.com/cloudtools/gghelper.(*GreengrassSession).GetConfigArchive(0xc420154000, 0x0)
	/Users/mark/go/src/github.com/cloudtools/gghelper/archive.go:37 +0x19e
main.CreateGroup(0xc42000e0a0, 0x2, 0x2)
	/Users/mark/go/src/github.com/cloudtools/gghelper/cmd/gghelper/group.go:36 +0x2cc
main.main()
	/Users/mark/go/src/github.com/cloudtools/gghelper/cmd/gghelper/gghelper.go:40 +0x637

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions