Refuse to rewrite when MaxSubmatch() is too large.

Change-Id: I76f1d92586c3e0f4895ceb16fb019951843497f8
Reviewed-on: https://code-review.googlesource.com/c/re2/+/56870
Reviewed-by: Paul Wankadia <junyer@google.com>
(cherry picked from commit aecba11114cf1fac5497aeb844b6966106de3eb6)
Reviewed-on: https://code-review.googlesource.com/c/re2/+/56871
2 files changed