]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.18] 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:25 +0000 (14:06 +0000)
commit9240558e4f342fc6e98fec22de17c04b45089349
tree8e393c1bd7efe9c2ee23921d3d18840aeb17a14d
parentbe7c68147870c3574cbee5c110e89a2ba5f2f267
[release-branch.go1.18] math/big: check buffer lengths in GobDecode

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

Updates #53871
Fixes #54095

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/+/419815
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