From: Tom Lane <tgl@sss.pgh.pa.us>
To: Christopher Dillard <csdillard@gmail.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #6044: Access violation on XML decl with standalone
Date: Fri, 27 May 2011 22:04:15 -0400
Message-ID: <9897.1306548255@sss.pgh.pa.us> (raw)
In-Reply-To: <201105272002.p4RK24nG040936@wwwmaster.postgresql.org>
References: <201105272002.p4RK24nG040936@wwwmaster.postgresql.org>
"Christopher Dillard" <csdillard@gmail.com> writes:
> In PostgreSQL 8.4.8, the function "xml_recv" (in
> src/backend/utils/adt/xml.c) calls the function "parse_xml_decl", passing
> NULL for the final "standalone" parameter. However, "parse_xml_decl" does
> not check for standalone==NULL, and blindly sets "*standalone = 0". This
> causes a crash if the xml declaration actually has a standalone parmeter,
> e.g. '<?xml version="1.0" standalone="no"?><anything/>'.
Ugh, you're right.
> I wish I could provide a SQL test case, but I only found this by setting a
> breakpoint on the 0xC0000005 exception in Visual Studio.
AFAIK there isn't any way to exercise the receive functions via psql.
You need a client that will send data as binary parameters. But it's
obvious by inspection of the code that it's broken. Will fix, thanks
for the report!
regards, tom lane
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, csdillard@gmail.com
Subject: Re: BUG #6044: Access violation on XML decl with standalone
In-Reply-To: <9897.1306548255@sss.pgh.pa.us>
References: <201105272002.p4RK24nG040936@wwwmaster.postgresql.org> <9897.1306548255@sss.pgh.pa.us>
* 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