Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6d46ea2

Browse files
committed
Add one more byte to malloc for null storage.
1 parent9fb5c75 commit6d46ea2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/bin/initdb/initdb.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
* Portions Copyright (c) 1994, Regents of the University of California
4040
* Portions taken from FreeBSD.
4141
*
42-
* $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.57 2004/10/0716:53:25 momjian Exp $
42+
* $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.58 2004/10/0717:29:12 momjian Exp $
4343
*
4444
*-------------------------------------------------------------------------
4545
*/
@@ -1909,7 +1909,7 @@ escape_locale(char **locale)
19091909
{
19101910
intlen=strlen(*locale),
19111911
i,j;
1912-
char*loc_temp=xmalloc(len*2);
1912+
char*loc_temp=xmalloc(len*2+1);
19131913

19141914
for (i=0,j=0;i<len;i++)
19151915
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp