We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9fb5c75 commit 6d46ea2Copy full SHA for 6d46ea2
src/bin/initdb/initdb.c
@@ -39,7 +39,7 @@
39
* Portions Copyright (c) 1994, Regents of the University of California
40
* Portions taken from FreeBSD.
41
*
42
- * $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.57 2004/10/07 16:53:25 momjian Exp $
+ * $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.58 2004/10/07 17:29:12 momjian Exp $
43
44
*-------------------------------------------------------------------------
45
*/
@@ -1909,7 +1909,7 @@ escape_locale(char **locale)
1909
{
1910
int len = strlen(*locale),
1911
i, j;
1912
- char *loc_temp = xmalloc(len * 2);
+ char *loc_temp = xmalloc(len * 2 + 1);
1913
1914
for (i = 0, j = 0; i < len; i++)
1915
0 commit comments