Skip to content

Commit 72d113d

Browse files
committed
Reduce max message size from max uint32 to max int32
Signed-off-by: Yilun <zyl.skysniper@gmail.com>
1 parent 3af4c28 commit 72d113d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

encoding.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ func readVarBytes(reader io.Reader, b, lenBuf []byte) (int, error) {
2626
}
2727

2828
func writeVarBytes(writer io.Writer, b, lenBuf []byte) error {
29-
if len(b) > math.MaxUint32 {
29+
if len(b) > math.MaxInt32 {
3030
return errors.New("data size too large")
3131
}
3232

0 commit comments

Comments
 (0)