pgsql: Defend against null error message reported by libxml2. - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Defend against null error message reported by libxml2.
Date
Msg-id E1gsAw1-0003is-I1@gemulon.postgresql.org
Whole thread Raw
List 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_5_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/7821a4d60ed677ce19646383a2fc2e9e56319d5f

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


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Doc: fix thinko in description of how to escape a backslash inb
Next
From: Tom Lane
Date:
Subject: pgsql: First-draft release notes for 11.2.