From: | neilc(at)svr1(dot)postgresql(dot)org (Neil Conway) |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Correct some code in pg_restore when reading the header of a tar |
Date: | 2005-06-22 02:02:09 |
Message-ID: | 20050622020209.516825293C@svr1.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Log Message:
-----------
Correct some code in pg_restore when reading the header of a tar archive:
(1) The code doesn't initialize `sum', so the initial "does the checksum
match?" test is wrong.
(2) The loop that is intended to check for a "null block" just checks
the first byte of the tar block 512 times, rather than each of the
512 bytes one time (!), which I'm guessing was the intent.
It was only through sheer luck that this worked in the first place.
Per Coverity static analysis performed by EnterpriseDB.
Tags:
----
REL8_0_STABLE
Modified Files:
--------------
pgsql/src/bin/pg_dump:
pg_backup_tar.c (r1.46.4.1 -> r1.46.4.2)
(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/bin/pg_dump/pg_backup_tar.c.diff?r1=1.46.4.1&r2=1.46.4.2)
From | Date | Subject | |
---|---|---|---|
Next Message | Neil Conway | 2005-06-22 02:12:19 | pgsql: Correct some code in pg_restore when reading the header of a tar |
Previous Message | Neil Conway | 2005-06-22 02:00:47 | pgsql: Correct some code in pg_restore when reading the header of a tar |