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
encoding/gob: Decode: invalid memory address or nil pointer dereference #6323
Labels
Comments
Finally managed to reproduce the crash, here is a reproducing example: https://gist.github.com/arnaud-lb/1396ea67af6f57ad5efa It is possible that the input is malformed / corrupted. |
The input contains a `(type id, encoding of a value)`, where `type id` refers to a type that hasn't been described over the wire. The decoder doesn't handle this, and crashes when trying to access the `wireType` at `dec.wireType[wireId]`, which doesn't exist. I've attached a smaller reproducing example: bug.go The attached diff fixes the problem for me, although it may not handle all cases. Attachments: |
This issue was closed by revision 7a73f32. Status changed to Fixed. |
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
by arnaud.lb:
The text was updated successfully, but these errors were encountered: