pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix assert in logicalmsg_desc 3+ messages / 1 participants [nested] [flat]
* pgsql: Fix assert in logicalmsg_desc @ 2022-08-16 22:20 Tomas Vondra <tomas.vondra@postgresql.org> 0 siblings, 0 replies; 3+ messages in thread From: Tomas Vondra @ 2022-08-16 22:20 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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 ------ master Details ------- https://git.postgresql.org/pg/commitdiff/c52ad9c4efdb91ce274c65b1acdb350e439c7b2d Modified Files -------------- src/backend/access/rmgrdesc/logicalmsgdesc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 3+ messages in thread
* pgsql: Fix assert in logicalmsg_desc @ 2022-08-16 22:20 Tomas Vondra <tomas.vondra@postgresql.org> 0 siblings, 0 replies; 3+ messages in thread From: Tomas Vondra @ 2022-08-16 22:20 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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_15_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/be6aadf07d005c292ac05e4b80761f7962facb71 Modified Files -------------- src/backend/access/rmgrdesc/logicalmsgdesc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 3+ messages in thread
* pgsql: Fix assert in logicalmsg_desc @ 2022-08-16 22:20 Tomas Vondra <tomas.vondra@postgresql.org> 0 siblings, 0 replies; 3+ messages in thread From: Tomas Vondra @ 2022-08-16 22:20 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org 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(-) ^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2022-08-16 22:20 UTC | newest] Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2022-08-16 22:20 pgsql: Fix assert in logicalmsg_desc Tomas Vondra <tomas.vondra@postgresql.org> 2022-08-16 22:20 pgsql: Fix assert in logicalmsg_desc Tomas Vondra <tomas.vondra@postgresql.org> 2022-08-16 22:20 pgsql: Fix assert in logicalmsg_desc Tomas Vondra <tomas.vondra@postgresql.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox