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

encoding/gob: panic on decoding bad input #2301

gopherbot opened this issue Sep 23, 2011 · 2 comments

encoding/gob: panic on decoding bad input #2301

gopherbot opened this issue Sep 23, 2011 · 2 comments


Copy link

@gopherbot gopherbot commented Sep 23, 2011

by consalus:

The following produces a panic:

    b := []byte{0xfb, 0xa5, 0x82, 0x2f, 0xca, 0x1}

 This is due to an overflow in the conversion from uint64 to int in (*Decoder).recvMessage, which
makes nbytes negative.

Which compiler are you using (5g, 6g, 8g, gccgo)?


Which operating system are you using?


Which revision are you using?  (hg identify)

387f8f80bf20+ tip

Please provide any additional information below.
Copy link

@rsc rsc commented Sep 23, 2011

Comment 1:

Thanks for the debugging analysis.

Owner changed to @robpike.

Status changed to Accepted.

Copy link

@robpike robpike commented Sep 26, 2011

Comment 2:

This issue was closed by revision 4c462e6.

Status changed to Fixed.

@mikioh mikioh changed the title gob: panic on decoding bad input encoding/gob: panic on decoding bad input Feb 26, 2015
@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.