Re: new regexp_*(text, text, int) functions crash
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jaime Casanova <jcasanov@systemguards.com.ec>
Cc: pgsql-hackers@postgresql.org
Date: 2021-09-11T18:42:42Z
Lists: pgsql-hackers
Jaime Casanova <jcasanov@systemguards.com.ec> writes:
> BTW, this only happens when the third parameter is large. Here is an
> example that consistently crash here:
> select regexp_count('jaime.casanova', 'valid', 102481);
Hah ... pg_regexec has never had a check that the search start position
is sane. Will fix.
regards, tom lane
Commits
-
Make pg_regexec() robust against out-of-range search_start.
- ec89d7acedcd 9.6.24 landed
- daac97eb0b9f 10.19 landed
- 3be381a900df 11.14 landed
- 3adde7eb6633 12.9 landed
- 7e420072ea4a 13.5 landed
- b33283cbd336 14.0 landed
- e757080e0412 15.0 landed