]> Cypherpunks repositories - gostls13.git/commit
encoding/gob: more cleanups handling slice length
authorRob Pike <r@golang.org>
Mon, 6 Apr 2015 22:58:26 +0000 (15:58 -0700)
committerRob Pike <r@golang.org>
Tue, 7 Apr 2015 17:48:03 +0000 (17:48 +0000)
commit0c8fe3463fe5dc49361d7fdcaa2a4d23a38c3151
treed0aca20dd306f56df39922db22e763a850ddb2db
parentd3252a2db9b8e1b6cff26dd4d2721cedc91378dc
encoding/gob: more cleanups handling slice length

Fix the other places the slice length was being believed, and refactor
the code to use a single function to unify the check.

Fixes #10273.

Change-Id: Ia62b25203fbe87c95d71a70ebc1db8d202eaa4a4
Reviewed-on: https://go-review.googlesource.com/8511
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/encoding/gob/decode.go
src/encoding/gob/encoder_test.go