pgsql: Add missing array-enlargement logic to test_regex.c.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Add missing array-enlargement logic to test_regex.c.
Date: 2021-01-17 17:53:55
Message-ID: E1l1CFP-0001j6-11@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Add missing array-enlargement logic to test_regex.c.

The stanza to report a "partial" match could overrun the initially
allocated output array, so it needs its own copy of the array-resizing
logic that's in the main loop. I overlooked the need for this in
ca8217c10.

Per report from Alexander Lakhin.

Discussion: https://postgr.es/m/3206aace-50db-e02a-bbea-76d5cdaa2cb6@gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/0c7d3bb99f72d66ec6ac63aee4c5fe6d683eee86

Modified Files
--------------
src/test/modules/test_regex/test_regex.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)

Browse pgsql-committers by date

  From Date Subject
Next Message Tomas Vondra 2021-01-17 21:30:49 pgsql: Set PD_ALL_VISIBLE and visibility map bits in COPY FREEZE
Previous Message Magnus Hagander 2021-01-17 14:35:23 pgsql: Add documentation chapter about checksums