Fix for possible pg_dump core dump

Started by Pete Formanalmost 25 years ago3 messages
#1Pete Forman
pete.forman@westerngeco.com
2 attachment(s)

I've fixed this bug in 7.1RC1. It may have been causing core dumps by
dereferencing a null function pointer. As it was the Sun compiler
flagged it as an error. (SC5.0 on Solaris 2.6.)

Attachments:

pg_dump.patchtext/plainDownload
*** src/bin/pg_dump/pg_backup_null.c.orig	Sat Mar 24 00:54:54 2001
--- src/bin/pg_dump/pg_backup_null.c	Tue Mar 27 09:50:24 2001
***************
*** 98,104 ****
  static void
  _PrintTocData(ArchiveHandle *AH, TocEntry *te, RestoreOptions *ropt)
  {
! 	if (*te->dataDumper)
  	{
  		AH->currToc = te;
  		(*te->dataDumper) ((Archive *) AH, te->oid, te->dataDumperArg);
--- 98,104 ----
  static void
  _PrintTocData(ArchiveHandle *AH, TocEntry *te, RestoreOptions *ropt)
  {
! 	if (te->dataDumper)
  	{
  		AH->currToc = te;
  		(*te->dataDumper) ((Archive *) AH, te->oid, te->dataDumperArg);
funcptr.ctext/plainDownload
#2Philip Warner
pjw@rhyme.com.au
In reply to: Pete Forman (#1)
Re: Fix for possible pg_dump core dump

At 10:20 27/03/01 +0100, Pete Forman wrote:

I've fixed this bug in 7.1RC1. It may have been causing core dumps by
dereferencing a null function pointer. As it was the Sun compiler
flagged it as an error. (SC5.0 on Solaris 2.6.)

Thanks for this, but Tom applied a similar patch a few days ago.

----------------------------------------------------------------
Philip Warner | __---_____
Albatross Consulting Pty. Ltd. |----/ - \
(A.B.N. 75 008 659 498) | /(@) ______---_
Tel: (+61) 0500 83 82 81 | _________ \
Fax: (+61) 0500 83 82 82 | ___________ |
Http://www.rhyme.com.au | / \|
| --________--
PGP key available upon request, | /
and from pgp5.ai.mit.edu:11371 |/

#3Pete Forman
pete.forman@westerngeco.com
In reply to: Philip Warner (#2)
Re: Fix for possible pg_dump core dump

Philip Warner writes:

At 10:20 27/03/01 +0100, Pete Forman wrote:

I've fixed this bug in 7.1RC1. It may have been causing core
dumps by dereferencing a null function pointer. As it was the Sun
compiler flagged it as an error. (SC5.0 on Solaris 2.6.)

Thanks for this, but Tom applied a similar patch a few days ago.

I can see Steve Nicolai's patch now. I had looked in the archives
before posting but got 190 hits on pg_backup_null with no option to
sort by date. Trying again on Google Groups this time gets me
straight there.
--
Pete Forman -./\.- Disclaimer: This post is originated
WesternGeco -./\.- by myself and does not represent
pete.forman@westerngeco.com -./\.- opinion of Schlumberger, Baker
http://www.crosswinds.net/~petef -./\.- Hughes or their divisions.