From: | Joe Conway <mail(at)joeconway(dot)com> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Disallow null category in crosstab_hash |
Date: | 2019-12-23 18:36:35 |
Message-ID: | E1ijSZH-00052f-GY@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Disallow null category in crosstab_hash
While building a hash map of categories in load_categories_hash,
resulting category names have not thus far been checked to ensure
they are not null. Prior to pg12 null category names worked to the
extent that they did not crash on some platforms. This is because
those system libraries have an snprintf which can deal with being
passed a null pointer argument for a string. But even in those cases
null categories did nothing useful. And on some platforms it crashed.
As of pg12, our own version of snprintf gets called, and it does
not deal with null pointer arguments at all, and crashes consistently.
Fix that by disallowing null categories. They never worked usefully,
and no one has ever asked for them to work previously. Back-patch to
all supported branches.
Reported-By: Ireneusz Pluta
Discussion: https://postgr.es/m/16176-7489719b05e4303c@postgresql.org
Branch
------
REL9_4_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/4a3cdb531be57bf96acd211e9c058b1b72a6fb39
Modified Files
--------------
contrib/tablefunc/tablefunc.c | 5 +++++
1 file changed, 5 insertions(+)
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Munro | 2019-12-24 00:21:49 | pgsql: Rotate instead of shifting hash join batch number. |
Previous Message | Joe Conway | 2019-12-23 18:36:32 | pgsql: Disallow null category in crosstab_hash |