The specification of "copy", the builtin function per https://pkg.go.dev/builtin#copy, says that it returns the minimum of len(src) and len(dst) when invoked as: copy(dst, src) of which the prior code blindly assumed that everytime that copy is invoked that the buffer provided had enough size to accomodate the contents of *.MarshalTo but this isn't true at all if len(data) is less than the values of .Marshal() |
||
---|---|---|
.. | ||
CHANGELOG.md | ||
doc.go | ||
go.mod | ||
go.sum | ||
int.go | ||
int_internal_test.go | ||
int_test.go | ||
proto.go | ||
uint.go | ||
uint_internal_test.go | ||
uint_test.go |