]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.17] math/big: check buffer lengths in GobDecode
authorRoland Shoemaker <roland@golang.org>
Fri, 15 Jul 2022 17:43:44 +0000 (10:43 -0700)
committerCherry Mui <cherryyz@google.com>
Fri, 29 Jul 2022 14:06:18 +0000 (14:06 +0000)
commit703c8ab7e5ba75c95553d4e249309297abad7102
treeb01fba8f8fed093e7ebe56f6836c13b4a2f1b651
parentd9242f7a8c29aa17201cd66d29cdd20916c2de60
[release-branch.go1.17] math/big: check buffer lengths in GobDecode

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

Updates #53871
Fixes #54094

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>
(cherry picked from commit 055113ef364337607e3e72ed7d48df67fde6fc66)
Reviewed-on: https://go-review.googlesource.com/c/go/+/419814
Reviewed-by: Julie Qiu <julieqiu@google.com>
src/math/big/floatmarsh.go
src/math/big/floatmarsh_test.go
src/math/big/ratmarsh.go
src/math/big/ratmarsh_test.go