]> Cypherpunks repositories - gostls13.git/commit
regexp/syntax: exclude full range from String negation case
authorKeegan Carruthers-Smith <keegan.csmith@gmail.com>
Tue, 7 May 2019 13:49:56 +0000 (15:49 +0200)
committerBrad Fitzpatrick <bradfitz@golang.org>
Wed, 22 May 2019 04:43:25 +0000 (04:43 +0000)
commit648c7b592a30b2280e8d23419224c657ab0a8332
tree33a0d58ecaa32baf2da745d35c3fd4974defd91c
parent24b43013a12ed8bab9adcce5b8265b1fb87ff506
regexp/syntax: exclude full range from String negation case

If the char class is 0x0-0x10ffff we mistakenly would String that to `[^]`,
which is not a valid regex.

Fixes #31807

Change-Id: I9ceeaddc28b67b8e1de12b6703bcb124cc784556
Reviewed-on: https://go-review.googlesource.com/c/go/+/175679
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/regexp/syntax/parse_test.go
src/regexp/syntax/regexp.go