e6fdfbb1cb
This commit fixes a bug in DTUint16 and DTUint32, which would cause them to read too many bytes from the reader. This is due to the fact that ReadFull was being called on a slice that could be greater than the underlying type. This is not an issue for DTUint64, since the 8-byte buffer corresponds to the maximum possible size of a uint64. The solution is to clamp the buffer to 2 and 4 bytes respectively. A series of tests are also added to exercise these cases. |
||
---|---|---|
.. | ||
bench_test.go | ||
primitive.go | ||
record.go | ||
stream.go | ||
tlv_test.go | ||
truncated_test.go | ||
truncated.go | ||
varint_test.go | ||
varint.go |