diff options
Diffstat (limited to 'libgo/go/encoding/gob/decoder.go')
-rw-r--r-- | libgo/go/encoding/gob/decoder.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libgo/go/encoding/gob/decoder.go b/libgo/go/encoding/gob/decoder.go index 5e684d3..fb28c8c 100644 --- a/libgo/go/encoding/gob/decoder.go +++ b/libgo/go/encoding/gob/decoder.go @@ -75,7 +75,9 @@ func (dec *Decoder) recvMessage() bool { dec.err = err return false } - if nbytes >= 1<<31 { + // Upper limit of 1GB, allowing room to grow a little without overflow. + // TODO: We might want more control over this limit. + if nbytes >= 1<<30 { dec.err = errBadCount return false } |