Skip site navigation (1) Skip section navigation (2)

Re: BUG #6044: Access violation on XML decl with standalone

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Christopher Dillard" <csdillard(at)gmail(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #6044: Access violation on XML decl with standalone
Date: 2011-05-28 02:04:15
Message-ID: 9897.1306548255@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-bugs
"Christopher Dillard" <csdillard(at)gmail(dot)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

In response to

pgsql-bugs by date

Next:From: Alvaro HerreraDate: 2011-05-28 05:06:42
Subject: Re: 9.1 plperlu bug with null rows in trigger hash
Previous:From: Alexey KlyukinDate: 2011-05-27 20:43:54
Subject: Re: 9.1 plperlu bug with null rows in trigger hash

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group