From 152aec019df9399afb72aa720b23c3bba0ac2bbe Mon Sep 17 00:00:00 2001
From: Sergei Golubchik <serg@mariadb.org>
Date: Sun, 21 May 2017 13:19:38 +0200
Subject: [PATCH] MDEV-11650 plugins.cracklib_password_check,
 plugins.two_password_validations fail in buildbot with valgrind (Conditional
 jump or move depends on uninitialised value)

---
 plugin/cracklib_password_check/cracklib_password_check.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/plugin/cracklib_password_check/cracklib_password_check.c b/plugin/cracklib_password_check/cracklib_password_check.c
index 7861d5fd83e..94587a6d659 100644
--- a/plugin/cracklib_password_check/cracklib_password_check.c
+++ b/plugin/cracklib_password_check/cracklib_password_check.c
@@ -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;