]> Cypherpunks.ru repositories - gostls13.git/commit
math/big: check buffer lengths in GobDecode
authorRoland Shoemaker <roland@golang.org>
Fri, 15 Jul 2022 17:43:44 +0000 (10:43 -0700)
committerRoland Shoemaker <roland@golang.org>
Wed, 27 Jul 2022 18:31:51 +0000 (18:31 +0000)
commit055113ef364337607e3e72ed7d48df67fde6fc66
tree7d2c3cb068cabbeece31d6782b7153693e2570f4
parent424814615491c604e6a0945f33e5a7b779dc2be5
math/big: check buffer lengths in GobDecode

In Float.GobDecode and Rat.GobDecode, check buffer sizes before
indexing slices.

Fixes #53871

Change-Id: I1b652c32c2bc7a0e8aa7620f7be9b2740c568b0a
Reviewed-on: https://go-review.googlesource.com/c/go/+/417774
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Tatiana Bradley <tatiana@golang.org>
Run-TryBot: Roland Shoemaker <roland@golang.org>
src/math/big/floatmarsh.go
src/math/big/floatmarsh_test.go
src/math/big/ratmarsh.go
src/math/big/ratmarsh_test.go