]> Cypherpunks repositories - gostls13.git/commit
math/big: prevent overflow in (*Rat).SetString
authorKatie Hockman <katie@golang.org>
Wed, 19 Jan 2022 21:54:41 +0000 (16:54 -0500)
committerKatie Hockman <katie@golang.org>
Thu, 27 Jan 2022 21:25:18 +0000 (21:25 +0000)
commitad345c265916bbf6c646865e4642eafce6d39e78
tree80402c13271f9e871a2775bc38cf9c49dc99efcf
parentf5fe5a4524d5e5390238ae7f5abcaa4299b31a37
math/big: prevent overflow in (*Rat).SetString

Credit to rsc@ for the original patch.

Thanks to the OSS-Fuzz project for discovering this
issue and to Emmanuel Odeke (@odeke_et) for reporting it.

Fixes #50699
Fixes CVE-2022-23772

Change-Id: I590395a3d55689625390cf1e58f5f40623b26ee5
Reviewed-on: https://go-review.googlesource.com/c/go/+/379537
Trust: Katie Hockman <katie@golang.org>
Run-TryBot: Katie Hockman <katie@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
Reviewed-by: Roland Shoemaker <roland@golang.org>
Reviewed-by: Julie Qiu <julie@golang.org>
src/math/big/ratconv.go
src/math/big/ratconv_test.go