pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alexander Lakhin <exclusion@gmail.com>
To: Michael Paquier <michael@paquier.xyz>
To: cca5507 <cca5507@qq.com>
Cc: Jim Jones <jim.jones@uni-muenster.de>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-bugs <pgsql-bugs@lists.postgresql.org>
Cc: maralist86 <maralist86@mail.ru>
Subject: Re: BUG #18943: Return value of a function 'xmlBufferCreate' isdereferenced at xpath.c:177 without checking for NUL
Date: Thu, 12 Mar 2026 07:00:00 +0200
Message-ID: <c516a0d9-4406-47e3-9087-5ca5176ebcf9@gmail.com> (raw)
In-Reply-To: <aa9FRUsCenN8Vfum@paquier.xyz>
References: <aEEingzOta_S_Nu7@paquier.xyz>
	<CAPLXN34Dr3Gbi+xJ6BgCeTyBJkMVe3cn7qxoADV72rC9ZHeBtQ@mail.gmail.com>
	<d2410ca0-c0dd-4f63-9e70-3d7a62a5d705@uni-muenster.de>
	<b35e2342-0f02-4365-94cf-55052ac9bda1@uni-muenster.de>
	<aEKCoNIfLxjyKY3r@paquier.xyz>
	<31f3480e-cd7d-4021-b392-87922572cc37@uni-muenster.de>
	<aETzMep2fGfB0AIp@paquier.xyz>
	<tencent_5BE8DAD985EE140ED62EA728C8D4E1311F0A@qq.com>
	<tencent_51B1563E654EA6188FF240C8CE2434B6B005@qq.com>
	<aa53WWdR7E4z345v@paquier.xyz>
	<aa9FRUsCenN8Vfum@paquier.xyz>

Hello Michael,

Maybe you would like to fix in passing one more anomaly there:
create extension xml2;
select xslt_process('<aaa/>','<xsl:stylesheet version="1.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"></xsl:stylesheet>';);

leads to:
varlena.c:199:2: runtime error: null pointer passed as argument 2, which is declared to never be null
     #0 0x640756666936 in cstring_to_text_with_len .../src/backend/utils/adt/varlena.c:199
     #1 0x7e46c0f4805e in xslt_process .../contrib/xml2/xslt_proc.c:149
     #2 0x640755a3ecbf in ExecInterpExpr .../src/backend/executor/execExprInterp.c:1001
     #3 0x640755a277aa in ExecInterpExprStillValid .../src/backend/executor/execExprInterp.c:2299
     #4 0x640755ef11e0 in ExecEvalExprSwitchContext ../../../../src/include/executor/executor.h:444
     #5 0x640755efd7b6 in evaluate_expr .../src/backend/optimizer/util/clauses.c:5724

for a build made with -fsanitize=undefined.

Best regards,
Alexander





view thread (27+ messages)  latest in thread

Message-ID: <c516a0d9-4406-47e3-9087-5ca5176ebcf9@gmail.com>
Permalink:  ../c516a0d9-4406-47e3-9087-5ca5176ebcf9@gmail.com/
Also on:    postgresql.org/message-id/c516a0d9-4406-47e3-9087-5ca5176ebcf9@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: exclusion@gmail.com, michael@paquier.xyz, cca5507@qq.com, jim.jones@uni-muenster.de, tgl@sss.pgh.pa.us, pgsql-bugs@lists.postgresql.org, maralist86@mail.ru
  Subject: Re: BUG #18943: Return value of a function 'xmlBufferCreate' isdereferenced at xpath.c:177 without checking for NUL
  In-Reply-To: <c516a0d9-4406-47e3-9087-5ca5176ebcf9@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox