Fix pgoutput crash on missing option values The replication protocol allows options without values, but pgoutput dereferenced a NULL DefElem argument for parameters proto_version and publication_names. A replication client was able to crash a WAL sender.
This issue is fixed by reading both options with defGetString(), which is able to report a missing parameter cleanly. Reported-by: Brar Piening <[email protected]> Author: Zhijie Hou <[email protected]> Reviewed-by: Hayato Kuroda <[email protected]> Reviewed-by: Kirill Reshke <[email protected]> Discussion: https://postgr.es/m/[email protected] Backpatch-through: 14 Branch ------ REL_17_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/c3ef3f2283d6a9b8d63ba35c5bc5ad4f1864682d Modified Files -------------- src/backend/replication/pgoutput/pgoutput.c | 10 ++++---- src/bin/pg_basebackup/t/030_pg_recvlogical.pl | 35 +++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 5 deletions(-)
