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

Commit08b0e60

Browse files
author
Neil Conway
committed
Fix a probably-harmless read of uninitialized memory in mkdir_p(), to
silence a valgrind warning.
1 parent25b8b69 commit08b0e60

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
@@ -43,7 +43,7 @@
4343
* Portions Copyright (c) 1994, Regents of the University of California
4444
* Portions taken from FreeBSD.
4545
*
46-
* $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.20 2004/01/3121:18:00 neilc Exp $
46+
* $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.21 2004/01/3122:10:00 neilc Exp $
4747
*
4848
*-------------------------------------------------------------------------
4949
*/
@@ -553,7 +553,7 @@ mkdir_p(char *path, mode_t omode)
553553
elseif (p[0]!='/')
554554
continue;
555555
*p='\0';
556-
if (p[1]=='\0')
556+
if (!last&&p[1]=='\0')
557557
last=1;
558558
if (first)
559559
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp