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

Commit4b833d0

Browse files
committed
Prevent core dump when die_horribly() is called with null AH pointer.
Problem reported and fixed by Oliver Elphick.
1 parent4dc2bce commit4b833d0

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

‎src/bin/pg_dump/pg_backup_archiver.c

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*
1616
*
1717
* IDENTIFICATION
18-
*$Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.65 2003/01/13 04:28:55 inoue Exp $
18+
*$Header: /cvsroot/pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.66 2003/01/27 00:23:38 tgl Exp $
1919
*
2020
*-------------------------------------------------------------------------
2121
*/
@@ -1379,14 +1379,15 @@ static void
13791379
_die_horribly(ArchiveHandle*AH,constchar*modulename,constchar*fmt,va_listap)
13801380
{
13811381
_write_msg(modulename,fmt,ap);
1382-
if (AH->public.verbose)
1383-
write_msg(NULL,"*** aborted because of error\n");
13841382

1385-
if (AH)
1383+
if (AH) {
1384+
if (AH->public.verbose)
1385+
write_msg(NULL,"*** aborted because of error\n");
13861386
if (AH->connection)
13871387
PQfinish(AH->connection);
1388-
if (AH->blobConnection)
1389-
PQfinish(AH->blobConnection);
1388+
if (AH->blobConnection)
1389+
PQfinish(AH->blobConnection);
1390+
}
13901391

13911392
exit(1);
13921393
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp