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 possible panic when using ComposeDecodeHookFunc() with no funcs #251

Conversation

eh-steve
Copy link

@eh-steve eh-steve commented Jul 9, 2021

On < v1.3.3, ComposeDecodeHookFunc() was safe to use with no args, but since decea91 (v1.4.1) it can cause a panic due to it accidentally replacing the input with an untyped nil after the nil check on L405

if input == nil {

This PR restores the previous behaviour with minimal impact to allow easier upgrades

@mitchellh
Copy link
Owner

Thanks this looks pretty good, I think it'd be easier to initialize data to f from the beginning it looks like.

@mitchellh mitchellh merged commit 6577afa into mitchellh:master Sep 14, 2021
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.

None yet

2 participants