pgsql: Avoid platform-dependent infinite loop in pg_dump.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Avoid platform-dependent infinite loop in pg_dump.
Дата
Msg-id E1RObt0-0000IW-AG@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Avoid platform-dependent infinite loop in pg_dump.

If malloc(0) returns NULL, the binary search in findSecLabels() will
probably go into an infinite loop when there are no security labels,
because NULL-1 is greater than NULL after wraparound.

(We've seen this pathology before ... I wonder whether there's a way to
detect the class of bugs automatically?)

Diagnosis and patch by Steve Singer, cosmetic adjustments by me

Branch
------
REL9_1_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/febda37fda469317f15b0acadfbdedab3d7dc793

Modified Files
--------------
src/bin/pg_dump/pg_dump.c |   11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)


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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: pgsql: Fix server header file installation with vpath builds
Следующее
От: Robert Haas
Дата:
Сообщение: pgsql: Revert removal of trace_userlocks, because userlocks aren't gone