encoding/gob: clean up decoderMap after errBadType
When decoding an invalid typeId the associated *decEngine was not removed from decoderMap. If the decoder was run again on the same input a nil *decEngine was found in the map and assumed to be initialized, resulting in a panic. Fixes #9649 Change-Id: I5bb51808362a21c09228c2705a658f073e5b59b3 Reviewed-on: https://go-review.googlesource.com/3509Reviewed-by: Rob Pike <r@golang.org>
Showing
Please
register
or
sign in
to comment