]> granicus.if.org Git - postgis/commitdiff
#2298, ST_AsGML geography crashable with monkey inputs
authorPaul Ramsey <pramsey@cleverelephant.ca>
Wed, 8 May 2013 20:37:12 +0000 (20:37 +0000)
committerPaul Ramsey <pramsey@cleverelephant.ca>
Wed, 8 May 2013 20:37:12 +0000 (20:37 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@11384 b70326c6-7e19-0410-871a-916f4a2858ee

postgis/geography_inout.c

index bd4441d547167655e980de511f70b2dad3b9ec8f..94a78c7f21901ae69fbdbc91b1a5c79fb95a2ae1 100644 (file)
@@ -267,7 +267,7 @@ Datum geography_as_gml(PG_FUNCTION_ARGS)
        /* retrieve id */
        if (PG_NARGS() >5 && !PG_ARGISNULL(5))
        {
-               prefix_text = PG_GETARG_TEXT_P(5);
+               id_text = PG_GETARG_TEXT_P(5);
                if ( VARSIZE(id_text)-VARHDRSZ == 0 )
                {
                        id = "";