pgsql: Fix assert in logicalmsg_desc

Поиск
Список
Период
Сортировка
От Tomas Vondra
Тема pgsql: Fix assert in logicalmsg_desc
Дата
Msg-id E1oO4vF-0015u8-7F@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Fix assert in logicalmsg_desc

The assert, introduced by 9f1cf97bb5, is intended to check if the prefix
is terminated by a \0 byte, but it has two flaws. Firstly, prefix_size
includes the \0 byte, so prefix[prefix_size] points to the byte after
the null byte. Secondly, the check ensures the byte is not equal \0,
while it should be checking the opposite.

Backpatch-through: 14
Discussion: https://postgr.es/m/b99b6101-2f14-3796-3dfa-4a6cd7d4326d@enterprisedb.com

Branch
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/239c3ee41be3b7c621c446344d09e3affeb8cd59

Modified Files
--------------
src/backend/access/rmgrdesc/logicalmsgdesc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)


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

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: pgsql: Fix assert in logicalmsg_desc
Следующее
От: Michael Paquier
Дата:
Сообщение: pgsql: Allow event trigger table_rewrite for ALTER MATERIALIZED VIEW