Commit c06eb1fc authored by Sietse Ringers's avatar Sietse Ringers
Browse files

fix: nil deref in registration issuance

parent 28336521
......@@ -496,13 +496,13 @@ type attributeGroup struct {
func (client *Client) groupCredentials(choice *irma.DisclosureChoice) (
[]attributeGroup, irma.DisclosedAttributeIndices, error,
) {
todisclose := make([]attributeGroup, 0, len(choice.Attributes))
if choice == nil || choice.Attributes == nil {
return todisclose, irma.DisclosedAttributeIndices{}, nil
return []attributeGroup{}, irma.DisclosedAttributeIndices{}, nil
}
// maps an irma.CredentialIdentifier to its index in the final ProofList
credIndices := make(map[irma.CredentialIdentifier]int)
todisclose := make([]attributeGroup, 0, len(choice.Attributes))
attributeIndices := make(irma.DisclosedAttributeIndices, len(choice.Attributes))
for i, attribute := range choice.Attributes {
var credIndex int
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment