Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix undefined behavior in replicator
The container can't be used without checking whether it's empty.
  • Loading branch information
markus456 committed Jun 1, 2023
1 parent e486e00 commit 701ff15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/modules/routing/replicator/rpl.cc
Expand Up @@ -1699,7 +1699,7 @@ uint8_t* Rpl::process_row_event_data(const Table& create,
SRowEventHandler& conv = m_handler;
int npresent = 0;
long ncolumns = create.columns.size();
const uint8_t* metadata = &create.column_metadata[0];
const uint8_t* metadata = create.column_metadata.empty() ? nullptr : &create.column_metadata[0];
size_t metadata_offset = 0;

/** BIT type values use the extra bits in the row event header */
Expand Down

0 comments on commit 701ff15

Please sign in to comment.