]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Avoid character classification in regex escape parsing.
authorJeff Davis <jdavis@postgresql.org>
Fri, 21 Apr 2023 15:19:41 +0000 (08:19 -0700)
committerJeff Davis <jdavis@postgresql.org>
Fri, 21 Apr 2023 15:21:18 +0000 (08:21 -0700)
commit106a1bf824ce80c434dbd4cee94e8b66e07e1231
tree282fe5c46be3b203e360bd23a6b2378c1d5cdc8a
parentc976ccc9e5578a6999f1848d34b869add1525cb5
Avoid character classification in regex escape parsing.

For regex escape sequences, just test directly for the relevant ASCII
characters rather than using locale-sensitive character
classification.

This fixes an assertion failure when a locale considers a non-ASCII
character, such as "൧", to be a digit.

Reported-by: Richard Guo
Discussion: https://postgr.es/m/CAMbWs49Q6UoKGeT8pBkMtJGJd+16CBFZaaWUk9Du+2ERE5g_YA@mail.gmail.com
Backpatch-through: 11
src/backend/regex/regc_lex.c