aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorDamian Gryski <[email protected]>2023-05-15 16:02:02 -0700
committerRon Evans <[email protected]>2023-05-16 19:02:08 +0200
commitd256804af7062612db09eb95a85e0a412d52d3b6 (patch)
tree1fbd4abe19ee7faa0cd138a667a27fd94becef92 /src
parente3c96803c3140c7128a5f7714be04f371b428e57 (diff)
downloadtinygo-d256804af7062612db09eb95a85e0a412d52d3b6.tar.gz
tinygo-d256804af7062612db09eb95a85e0a412d52d3b6.zip
src/reflect: remove overflow checks from uvarint32
Diffstat (limited to 'src')
-rw-r--r--src/reflect/type.go6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/reflect/type.go b/src/reflect/type.go
index 6a37dc7d5..d27e39142 100644
--- a/src/reflect/type.go
+++ b/src/reflect/type.go
@@ -1294,13 +1294,7 @@ func uvarint32(buf []byte) (uint32, int) {
var x uint32
var s uint
for i, b := range buf {
- if i == maxVarintLen32 {
- return 0, -(i + 1) // overflow
- }
if b < 0x80 {
- if i == maxVarintLen32-1 && b > 1 {
- return 0, -(i + 1) // overflow
- }
return x | uint32(b)<<s, i + 1
}
x |= uint32(b&0x7f) << s