File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 7
7
* Portions Copyright (c) 1996-2008, PostgreSQL Global Development Group
8
8
* Portions Copyright (c) 1994, Regents of the University of California
9
9
*
10
- * $PostgreSQL: pgsql/src/backend/utils/adt/xml.c,v 1.64 2008/01/01 19:45:53 momjian Exp $
10
+ * $PostgreSQL: pgsql/src/backend/utils/adt/xml.c,v 1.65 2008/01/12 10:38:32 neilc Exp $
11
11
*
12
12
*-------------------------------------------------------------------------
13
13
*/
@@ -1821,9 +1821,10 @@ map_sql_value_to_xml_value(Datum value, Oid type)
1821
1821
static char *
1822
1822
_SPI_strdup (const char * s )
1823
1823
{
1824
- char * ret = SPI_palloc (strlen (s ) + 1 );
1824
+ size_t len = strlen (s ) + 1 ;
1825
+ char * ret = SPI_palloc (len );
1825
1826
1826
- strcpy (ret , s );
1827
+ memcpy (ret , s , len );
1827
1828
return ret ;
1828
1829
}
1829
1830
You can’t perform that action at this time.
0 commit comments