Skip to content

Conversation

@tmthrgd
Copy link
Contributor

@tmthrgd tmthrgd commented Mar 6, 2023

Both SystemSecretKey.KeyGen and Setup try to dereference the return values from abe/cpabe/tkn20/internal/tkn without checking for an error. On error, these values are nil and the functions panic.

This is easy to reproduce by passing an io.Reader that returns an error.

Both SystemSecretKey.KeyGen and Setup try to dereference the return
values from abe/cpabe/tkn20/internal/tkn without checking for an error.
On error, these values are nil and the functions panic.

This is easy to reproduce by passing an io.Reader that returns an error.
@tmthrgd
Copy link
Contributor Author

tmthrgd commented Mar 6, 2023

I'm not sure if you want tests for this or not, let me know and I can add them.

@bwesterb bwesterb self-requested a review March 6, 2023 11:08
Copy link
Member

@bwesterb bwesterb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks.

@tanyav2
Copy link
Contributor

tanyav2 commented Mar 6, 2023

Feel free to merge

@bwesterb bwesterb merged commit 547dd87 into cloudflare:main Mar 6, 2023
@tmthrgd tmthrgd deleted the tkn20_rand_panic branch March 6, 2023 21:29
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.

3 participants