go/src/compress/gzip
Tatiana Bradley b2b8872c87 compress/gzip: fix stack exhaustion bug in Reader.Read
Replace recursion with iteration in Reader.Read to avoid stack
exhaustion when there are a large number of files.

Fixes CVE-2022-30631
Fixes #53168

Change-Id: I47d8afe3f2d40b0213ab61431df9b221794dbfe0
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/1455673
Reviewed-by: Roland Shoemaker <bracewell@google.com>
Reviewed-by: Julie Qiu <julieqiu@google.com>
Reviewed-on: https://go-review.googlesource.com/c/go/+/417067
Reviewed-by: Heschi Kreinick <heschi@google.com>
Run-TryBot: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-07-12 15:06:07 +00:00
..
testdata
example_test.go compress/gzip: always close bodyReader in Example_compressingReader 2022-06-22 16:24:14 +00:00
fuzz_test.go all: add a handful of fuzz targets 2022-01-13 18:06:33 +00:00
gunzip.go compress/gzip: fix stack exhaustion bug in Reader.Read 2022-07-12 15:06:07 +00:00
gunzip_test.go compress/gzip: fix stack exhaustion bug in Reader.Read 2022-07-12 15:06:07 +00:00
gzip.go
gzip_test.go all: update references to symbols moved from io/ioutil to io 2020-10-20 18:41:18 +00:00
issue14937_test.go compress/gzip: add missing license 2021-09-28 19:51:56 +00:00