pgsql: GCC 4.0 includes a new warning option, -Wformat-literal, that

Поиск
Список
Период
Сортировка
От neilc@svr1.postgresql.org (Neil Conway)
Тема pgsql: GCC 4.0 includes a new warning option, -Wformat-literal, that
Дата
Msg-id 20050430081945.D82425408C@svr1.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Log Message:
-----------
GCC 4.0 includes a new warning option, -Wformat-literal, that emits
a warning when a variable is used as a format string for printf()
and similar functions (if the variable is derived from untrusted
data, it could include unexpected formatting sequences). This
emits too many warnings to be enabled by default, but it does
flag a few dubious constructs in the Postgres tree. This patch
fixes up the obvious variants: functions that are passed a variable
format string but no additional arguments.

Most of these are harmless (e.g. the ruleutils stuff), but there
is at least one actual bug here: if you create a trigger named
"%sfoo", pg_dump will read uninitialized memory and fail to dump
the trigger correctly.

Tags:
----
REL8_0_STABLE

Modified Files:
--------------
    pgsql/src/backend/utils/adt:
        ruleutils.c (r1.188 -> r1.188.4.1)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/ruleutils.c.diff?r1=1.188&r2=1.188.4.1)
    pgsql/src/bin/initdb:
        initdb.c (r1.73.4.1 -> r1.73.4.2)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/bin/initdb/initdb.c.diff?r1=1.73.4.1&r2=1.73.4.2)
    pgsql/src/bin/pg_dump:
        dumputils.c (r1.16 -> r1.16.4.1)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/bin/pg_dump/dumputils.c.diff?r1=1.16&r2=1.16.4.1)
        pg_backup_archiver.c (r1.101.4.5 -> r1.101.4.6)

(http://developer.postgresql.org/cvsweb.cgi/pgsql/src/bin/pg_dump/pg_backup_archiver.c.diff?r1=1.101.4.5&r2=1.101.4.6)
        pg_dump.c (r1.400.4.3 -> r1.400.4.4)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/bin/pg_dump/pg_dump.c.diff?r1=1.400.4.3&r2=1.400.4.4)

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

Предыдущее
От: neilc@svr1.postgresql.org (Neil Conway)
Дата:
Сообщение: pgsql: GCC 4.0 includes a new warning option, -Wformat-literal, that
Следующее
От: neilc@svr1.postgresql.org (Neil Conway)
Дата:
Сообщение: pgsql: GCC 4.0 includes a new warning option, -Wformat-literal, that