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

From cca5507
Subject Re: BUG #18943: Return value of a function 'xmlBufferCreate' isdereferenced at xpath.c:177 without checking for NUL
Date
Msg-id tencent_5BE8DAD985EE140ED62EA728C8D4E1311F0A@qq.com
Whole thread Raw
In response to Re: BUG #18943: Return value of a function 'xmlBufferCreate' is dereferenced at xpath.c:177 without checking for NUL  (Michael Paquier <michael@paquier.xyz>)
Responses Re: BUG #18943: Return value of a function 'xmlBufferCreate' isdereferenced at xpath.c:177 without checking for NUL
List 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

pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #19426: pgdump is stuck
Next
From: "cca5507"
Date:
Subject: Re: BUG #18943: Return value of a function 'xmlBufferCreate' isdereferenced at xpath.c:177 without checking for NUL