From af6123a865546c8735acc64c344a4e02bd561c0d Mon Sep 17 00:00:00 2001 From: Emmanuel T Odeke Date: Thu, 6 May 2021 22:15:11 -0700 Subject: [PATCH] doc/go1.17: document encoding/binary.Uvarint max read of 10 bytes Updates #41185 For #44513. Fixes #46009 Change-Id: I60f4d891b897809765acc0aace037c78e95bb4f7 Reviewed-on: https://go-review.googlesource.com/c/go/+/317929 Trust: Emmanuel Odeke Reviewed-by: Keith Randall --- doc/go1.17.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/go1.17.html b/doc/go1.17.html index a2e0f9454b..3cd324e0ab 100644 --- a/doc/go1.17.html +++ b/doc/go1.17.html @@ -303,7 +303,10 @@ Do not send CLs removing the interior tags from such phrases.
encoding/binary

- TODO: https://golang.org/cl/299531: limit bytes read by Uvarint to <= 10 + binary.Uvarint will stop reading after 10 bytes to avoid + wasted computations. If more than 10 bytes are needed, the byte count returned is -11. +
+ Previous Go versions could return larger negative counts when reading incorrectly encoded varints.

-- 2.50.0