pgsql: Correct some code in pg_restore when reading the header of a tar

Поиск
Список
Период
Сортировка
От neilc@svr1.postgresql.org (Neil Conway)
Тема pgsql: Correct some code in pg_restore when reading the header of a tar
Дата
Msg-id 20050622021219.911C4528B4@svr1.postgresql.org
обсуждение исходный текст
Список 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:
----
REL7_4_STABLE

Modified Files:
--------------
    pgsql/src/bin/pg_dump:
        pg_backup_tar.c (r1.38 -> r1.38.2.1)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/bin/pg_dump/pg_backup_tar.c.diff?r1=1.38&r2=1.38.2.1)

В списке pgsql-committers по дате отправления:

Предыдущее
От: neilc@svr1.postgresql.org (Neil Conway)
Дата:
Сообщение: pgsql: Correct some code in pg_restore when reading the header of a tar
Следующее
От: neilc@svr1.postgresql.org (Neil Conway)
Дата:
Сообщение: pgsql: Fix bug in CONTINUE statement for PL/pgSQL: when we continue a