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_51B1563E654EA6188FF240C8CE2434B6B005@qq.com
Whole thread Raw
In response to Re: BUG #18943: Return value of a function 'xmlBufferCreate' isdereferenced at xpath.c:177 without checking for NUL  ("cca5507" <cca5507@qq.com>)
Responses Re: BUG #18943: Return value of a function 'xmlBufferCreate' isdereferenced at xpath.c:177 without checking for NUL
List pgsql-bugs
> 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.

Attach a small patch.

--
Regards,
ChangAo Chen

Attachment

pgsql-bugs by date:

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