regexp: limit the capacity of slices of bytes returned by FindX
This change limits the capacity of the slices of bytes returned by: - Find - FindAll - FindAllSubmatch to be the same as their length. Fixes #30169 Change-Id: I07b632757d2bfeab42fce0d42364e2a16c597360 Reviewed-on: https://go-review.googlesource.com/c/161877Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
Showing
Please register or sign in to comment