summaryrefslogtreecommitdiff
path: root/plugin/auth_pam
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2017-05-17 15:16:24 +0200
committerSergei Golubchik <serg@mariadb.org>2017-05-19 20:26:56 +0200
commit7c03edf2fe66855a8ce8f2575c3aaf66af975377 (patch)
tree7e793f937b759c8808668c8924b71a962f9b21f8 /plugin/auth_pam
parent335c4ab790254462753ba4ed8b074c5847b2708f (diff)
downloadmariadb-git-7c03edf2fe66855a8ce8f2575c3aaf66af975377.tar.gz
MDEV-6262 analyze the coverity report on mariadb
uploaded 10.0, analyzed everything with the Impact=High (and a couple of Medium)
Diffstat (limited to 'plugin/auth_pam')
-rw-r--r--plugin/auth_pam/auth_pam.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/plugin/auth_pam/auth_pam.c b/plugin/auth_pam/auth_pam.c
index fbca8bf9e93..a4d1deb8ada 100644
--- a/plugin/auth_pam/auth_pam.c
+++ b/plugin/auth_pam/auth_pam.c
@@ -141,6 +141,7 @@ static int pam_auth(MYSQL_PLUGIN_VIO *vio, MYSQL_SERVER_AUTH_INFO *info)
if (new_username && strcmp(new_username, info->user_name))
strncpy(info->authenticated_as, new_username,
sizeof(info->authenticated_as));
+ info->authenticated_as[sizeof(info->authenticated_as)-1]= 0;
end:
pam_end(pamh, status);