Skip site navigation (1) Skip section navigation (2)

Re: pg_restore loops forever past EOF for corrupt custom archive files

From: "Chad Wagner" <chad(dot)wagner(at)gmail(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: pg_restore loops forever past EOF for corrupt custom archive files
Date: 2007-08-05 17:18:36
Message-ID: 81961ff50708051018q9df446bra87ce9b58bcae9ed@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-patches
On 8/5/07, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> "Chad Wagner" <chad(dot)wagner(at)gmail(dot)com> writes:
> > This patch modifies the ReadStr function in pg_backup_archiver.c to
> validate
> > the result of *AH->ReadBufPtr matches the value of l.
>
> If we're trying to defend against premature EOF, this hardly seems like
> a sufficient patch.


I agree, but it is better than nothing.  If you have some suggestions or
other areas of the pg_restore code that I should take a look at then I don't
mind doing so.

The patch at least raises awareness to this problem.

In response to

Responses

pgsql-patches by date

Next:From: Gregory StarkDate: 2007-08-05 17:34:00
Subject: Re: Document and/or remove unreachable code in tuptoaster.c from varvarlena patch
Previous:From: Tom LaneDate: 2007-08-05 16:35:41
Subject: Re: pg_restore loops forever past EOF for corrupt custom archive files

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group