]> Cypherpunks repositories - gostls13.git/commit
regexp/syntax: add and use ErrInvalidDepth
authorRuss Cox <rsc@golang.org>
Wed, 2 Feb 2022 21:44:35 +0000 (16:44 -0500)
committerRuss Cox <rsc@golang.org>
Mon, 4 Apr 2022 10:59:27 +0000 (10:59 +0000)
commit1af60b2f4990bffdd1b050ffd11e978578d1e38f
tree1add02d574269d3af924fce2e1981debebbb56e3
parent492c85ab84dc1d4d19be0466d2d73f4a6174f07e
regexp/syntax: add and use ErrInvalidDepth

The fix for #51112 introduced a depth check but used
ErrInternalError to avoid introduce new API in a CL that
would be backported to earlier releases.

New API accepted in proposal #51684.

This CL adds a distinct error for this case.

For #51112.
Fixes #51684.

Change-Id: I068fc70aafe4218386a06103d9b7c847fb7ffa65
Reviewed-on: https://go-review.googlesource.com/c/go/+/384617
Trust: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
api/next/regexpdepth.txt [new file with mode: 0644]
src/regexp/syntax/parse.go