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 potential panic in decodeState() #1316

Merged
merged 2 commits into from
Apr 10, 2018

Conversation

simonpasquier
Copy link
Member

I've experienced the panics while investigating #1282: at that time, the data being passed to the decoder wasn't valid (good fuzz testing!). In normal conditions it shouldn't happen but I guess that it is still better to catch those nil pointers.

Signed-off-by: Simon Pasquier <spasquie@redhat.com>
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
Copy link
Member

@mxinden mxinden left a comment

Choose a reason for hiding this comment

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

In normal conditions it shouldn't happen but I guess that it is still better to catch those nil pointers.

Agreed! Thanks for the fix.

@mxinden mxinden merged commit 510e67e into prometheus:master Apr 10, 2018
@simonpasquier simonpasquier deleted the fix-decode-state branch April 11, 2018 09:23
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.

2 participants