From 681fbd98ee1c874e9443e45d0c0bc7c98b8cf717 Mon Sep 17 00:00:00 2001 From: Georg Richter Date: Fri, 21 Jul 2023 13:42:19 +0200 Subject: [PATCH] Fix for CONC-657: Since extra_data (MySQL ROWSV2 event) is not part of row data, we need to allocate memory for it's content. Kudos to Sruli Ganor for reporting this issue and providing a fix. --- libmariadb/mariadb_rpl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libmariadb/mariadb_rpl.c b/libmariadb/mariadb_rpl.c index f3b0bbc6..337e48f0 100644 --- a/libmariadb/mariadb_rpl.c +++ b/libmariadb/mariadb_rpl.c @@ -1754,7 +1754,7 @@ MARIADB_RPL_EVENT * STDCALL mariadb_rpl_fetch(MARIADB_RPL *rpl, MARIADB_RPL_EVEN RPL_CHECK_POS(ev, ev_end, rpl_event->event.rows.extra_data_size); if (rpl_event->event.rows.extra_data_size - 2 > 0) { - rpl_set_string_and_len(rpl_event->event.rows.extra_data, ev, rpl_event->event.rows.extra_data_size - 2); + rpl_alloc_set_string_and_len(rpl_event, rpl_event->event.rows.extra_data, ev, rpl_event->event.rows.extra_data_size - 2); ev+= rpl_event->event.rows.extra_data_size; } }