Re: BUG #18943: Return value of a function 'xmlBufferCreate' is dereferenced at xpath.c:177 without checking for NUL
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Jim Jones <jim.jones@uni-muenster.de>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, pgsql-bugs@lists.postgresql.org, maralist86@mail.ru
Date: 2025-06-08T02:19:29Z
Lists: pgsql-bugs
Attachments
- v4-0001-Improve-error-handling-with-calls-to-libxml2.patch (text/x-diff) patch v4-0001
- v4-0002-xml2-Improve-error-handling-in-corner-cases.patch (text/x-diff) patch v4-0002
On Fri, Jun 06, 2025 at 12:22:30PM +0200, Jim Jones wrote: > So, perhaps this? > > if (xmlAddChildList(root, content_nodes) == NULL || > xmlerrcxt->err_occurred) > xml_ereport(xmlerrcxt, > ERROR, ERRCODE_OUT_OF_MEMORY, > "could not add content nodes to root element"); ERRCODE_INTERNAL_ERROR would be more adapted, I'm only seeing error code paths caused by inconsistencies in the nodes. I have updated the patches with the attached, splitting the parts for contrib/xml2/ and the backend into two parts. These touch error paths that are very unlikely going to be hit in practice, so let's do all that once v19 opens for business only on HEAD. -- Michael
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
xml2: Fix failure with xslt_process() under -fsanitize=undefined
- 70f7c5badcc0 14.23 landed
- 0b0041b942f7 15.18 landed
- 5f46c617e95f 16.14 landed
- 63aa4342da23 17.10 landed
- e33a4fda0027 18.4 landed
- 7d64419f8073 19 (unreleased) landed
-
Fix misuse of "volatile" in xml.c
- 6307b096e259 19 (unreleased) landed
-
xml2: Improve error handling of libxml2 calls
- 732061150b00 19 (unreleased) landed
-
Improve error handling of libxml2 calls in xml.c
- 2e947217474c 19 (unreleased) landed