Re: BUG #18943: Return value of a function 'xmlBufferCreate' is dereferenced at xpath.c:177 without checking for NUL
Robin Haberkorn <haberkorn@b1-systems.de>
From: "Robin Haberkorn" <haberkorn@b1-systems.de>
To: "Michael Paquier" <michael@paquier.xyz>, "Tom Lane" <tgl@sss.pgh.pa.us>
Cc: "Jim Jones" <jim.jones@uni-muenster.de>,
<pgsql-bugs@lists.postgresql.org>, <maralist86@mail.ru>
Date: 2025-07-09T11:28:58Z
Lists: pgsql-bugs
On Wed Jul 9, 2025 at 03:45:07 GMT +03, Michael Paquier wrote: > Yes, I don't see a huge advantage in doing the switch for this module. > If the gain in information in the error states grabbed from libxml2 > makes it a win, that may be a different argument (I am fine to be > proved wrong), but I cannot get excited about that without more > data to claim it so. > Once switching to PG_XML_STRICTNESS_ALL, we should also theoretically be able to receive warnings and notices, that would be silent otherwise. I believe that getting rid of PG_XML_STRICTNESS_LEGACY might also be desirable if we ever want to get xml2 into core. But I notice that you did already change lots of PG_XML_STRICTNESS_LEGACY into PG_XML_STRICTNESS_ALL. > I have quickly tested the change, and the xpath_string() path was one > area that immediately stood out, and we may report an incorrect error. You are right. The test suite fails or hangs at least. We are probably still missing some checks. So it wouldn't just be a matter of replacing all remaining PG_XML_STRICTNESS_LEGACY. -- Robin Haberkorn Software Engineer B1 Systems GmbH Osterfeldstraße 7 / 85088 Vohburg / https://www.b1-systems.de GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt, HRB 3537
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