mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Fix for BUG#15018 "valgrind error in Rpl_filter (uninitalized memory - could crash)".
The code was reading a HASH or DYNAMIC_ARRAY which may be uninited (difference from 5.0 is that those vars were always zeroed in 5.0 because were static globals, while they are new'd in 5.1). sql/rpl_filter.cc: the hash or dynamic_array may not be inited, depends on a bool (e.g. if wild_do_table_inited==0 wild_do_table is uninitialized memory); the code was not taking the bool into account and so reading uninited memory. sql/rpl_filter.h: comments and prototype change (see rpl_filter.cc)
This commit is contained in:
@ -87,10 +87,15 @@ private:
|
||||
|
||||
void free_string_array(DYNAMIC_ARRAY *a);
|
||||
|
||||
void table_rule_ent_hash_to_str(String* s, HASH* h);
|
||||
void table_rule_ent_dynamic_array_to_str(String* s, DYNAMIC_ARRAY* a);
|
||||
void table_rule_ent_hash_to_str(String* s, HASH* h, bool inited);
|
||||
void table_rule_ent_dynamic_array_to_str(String* s, DYNAMIC_ARRAY* a,
|
||||
bool inited);
|
||||
TABLE_RULE_ENT* find_wild(DYNAMIC_ARRAY *a, const char* key, int len);
|
||||
|
||||
/*
|
||||
Those 4 structures below are uninitialized memory unless the
|
||||
corresponding *_inited variables are "true".
|
||||
*/
|
||||
HASH do_table;
|
||||
HASH ignore_table;
|
||||
DYNAMIC_ARRAY wild_do_table;
|
||||
|
Reference in New Issue
Block a user