diff options
| author | Rémy Oudompheng <remyoudompheng@gmail.com> | 2019-11-13 06:53:22 +0100 |
|---|---|---|
| committer | Robert Griesemer <gri@golang.org> | 2019-11-13 19:15:27 +0000 |
| commit | 7ad27481f84dbf325ee348831ed0f95dbf04094e (patch) | |
| tree | f9410e54e46fcbf89c82f30c09917afd76fb8bcb /src/os/exec/exec_test.go | |
| parent | e762378c42b786233ea13affa1cc2ee132ceefaf (diff) | |
| download | go-7ad27481f84dbf325ee348831ed0f95dbf04094e.tar.xz | |
math/big: fix out-of-bounds panic in divRecursive
The bounds in the last carry branch were wrong as there
is no reason for len(u) >= n+n/2 to always hold true.
We also adjust test to avoid using a remainder of 1
(in which case, the last step of the algorithm computes
(qhatv+1) - qhatv which rarely produces a carry).
Change-Id: I69fbab9c5e19d0db1c087fbfcd5b89352c2d26fb
Reviewed-on: https://go-review.googlesource.com/c/go/+/206839
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
Diffstat (limited to 'src/os/exec/exec_test.go')
0 files changed, 0 insertions, 0 deletions
