pgsql: Defend against null error message reported by libxml2.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Defend against null error message reported by libxml2.
Date: 2019-02-08 18:31:33
Message-ID: E1gsAw1-0003iq-Hk@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Defend against null error message reported by libxml2.

While this isn't really supposed to happen, it can occur in OOM
situations and perhaps others. Instead of crashing, substitute
"(no message provided)".

I didn't worry about localizing this text, since we aren't
localizing anything else here; besides, if we're on the edge of
OOM, it's unlikely gettext() would work.

Report and fix by Sergio Conde Gómez in bug #15624.

Discussion: https://postgr.es/m/15624-4dea54091a2864e6@postgresql.org

Branch
------
REL9_6_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/ef922faea703aff4996eab17520cb5201a793701

Modified Files
--------------
src/backend/utils/adt/xml.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2019-02-09 01:17:21 pgsql: First-draft release notes for 11.2.
Previous Message Tom Lane 2019-02-08 17:49:55 pgsql: Doc: fix thinko in description of how to escape a backslash in b