"Chad Wagner" <chad.wagner@gmail.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.