Re: BUG #18943: Return value of a function 'xmlBufferCreate' isdereferenced at xpath.c:177 without checking for NUL

From: cca5507 <cca5507(at)qq(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>, Jim Jones <jim(dot)jones(at)uni-muenster(dot)de>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-bugs <pgsql-bugs(at)lists(dot)postgresql(dot)org>, maralist86 <maralist86(at)mail(dot)ru>
Subject: Re: BUG #18943: Return value of a function 'xmlBufferCreate' isdereferenced at xpath.c:177 without checking for NUL
Date: 2026-03-08 14:12:09
Message-ID: tencent_5BE8DAD985EE140ED62EA728C8D4E1311F0A@qq.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi,

It seems that there are 2 misuse of "volatile" in xml.c:

1) xmltext()

volatile xmlChar *xmlbuf = NULL; // -> xmlChar *volatile xmlbuf = NULL;

2) xml_xmlnodetoxmltype()

volatile xmlChar *str = NULL; // -> xmlChar *volatile str = NULL;

We want the pointer itself be volatile rather than what it points to.

--
Regards,
ChangAo Chen

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message cca5507 2026-03-08 15:05:32 Re: BUG #18943: Return value of a function 'xmlBufferCreate' isdereferenced at xpath.c:177 without checking for NUL
Previous Message PG Bug reporting form 2026-03-07 09:40:19 BUG #19426: pgdump is stuck