new regexp_*(text, text, int) functions crash

Jaime Casanova <jcasanov@systemguards.com.ec>

From: Jaime Casanova <jcasanov@systemguards.com.ec>
To: pgsql-hackers@postgresql.org
Date: 2021-09-11T18:03:57Z
Lists: pgsql-hackers
Hi,

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);

-- 
Jaime Casanova
Director de Servicios Profesionales
SystemGuards - Consultores de PostgreSQL



Commits

  1. Make pg_regexec() robust against out-of-range search_start.