Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit d3be7fa

Browse files
committed
Add trailing zero byte in Unicode codepoint conversion.
1 parent abbf860 commit d3be7fa

File tree

1 file changed

+2
-2
lines changed
  • src/backend/utils/adt

1 file changed

+2
-2
lines changed

src/backend/utils/adt/xml.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $PostgreSQL: pgsql/src/backend/utils/adt/xml.c,v 1.22 2007/01/25 11:53:51 petere Exp $
10+
* $PostgreSQL: pgsql/src/backend/utils/adt/xml.c,v 1.23 2007/01/27 11:48:31 petere Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -1341,7 +1341,7 @@ map_sql_identifier_to_xml_name(char *ident, bool fully_escaped)
13411341
static char *
13421342
unicode_to_sqlchar(pg_wchar c)
13431343
{
1344-
static unsigned char utf8string[4];
1344+
static unsigned char utf8string[5]; /* need trailing zero */
13451345

13461346
if (c <= 0x7F)
13471347
{

0 commit comments

Comments
 (0)