MDEV-11650 plugins.cracklib_password_check, plugins.two_password_validations fail in buildbot with valgrind (Conditional jump or move depends on uninitialised value)

This commit is contained in:
Sergei Golubchik 2017-05-21 13:19:38 +02:00
parent fdc1fd6f49
commit 152aec019d

View file

@ -30,6 +30,7 @@ static int crackme(MYSQL_LEX_STRING *username, MYSQL_LEX_STRING *password)
const char *res;
memcpy(user, username->str, username->length);
user[username->length]= 0;
if ((host= strchr(user, '@')))
*host++= 0;