diff options
author | Daniele Sciascia <daniele.sciascia@galeracluster.com> | 2020-08-18 10:56:56 +0200 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@mariadb.com> | 2020-08-19 13:12:00 +0300 |
commit | fe3284b2cc8cc4f948aa234b3c6f9f2f8cffa027 (patch) | |
tree | 17aca91f5005b560389e21805d3623104b1c0305 /sql/wsrep_var.cc | |
parent | 09dd06f14aaf4ba8088f837625020617e5eca7ea (diff) | |
download | mariadb-git-fe3284b2cc8cc4f948aa234b3c6f9f2f8cffa027.tar.gz |
MDEV-23092 SIGABRT when setting invalid wsrep_provider
Some invalid wsrep_provider paths may be interpreted as a valid
directory. For example '/invalid/libgalera_smm.so' with UTF character
set is interpreted as '/', which is a valid directory. A early check
that wsrep_provider should not be a directory fixes it.
Diffstat (limited to 'sql/wsrep_var.cc')
-rw-r--r-- | sql/wsrep_var.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/wsrep_var.cc b/sql/wsrep_var.cc index 64362d1c9e2..3649153e172 100644 --- a/sql/wsrep_var.cc +++ b/sql/wsrep_var.cc @@ -320,6 +320,12 @@ static int wsrep_provider_verify (const char* provider_str) { return 1; } + + if (MY_S_ISDIR(f_stat.st_mode)) + { + return 1; + } + return 0; } |