Blob Blame History Raw
--- contrib/mod_sftp_pam.c
+++ contrib/mod_sftp_pam.c
@@ -315,7 +315,7 @@ static int sftppam_driver_open(sftp_kbdi
     exit(1);
   }
 
-  memset(sftppam_user, '\0', sizeof(sftppam_user));
+  memset(sftppam_user, '\0', sftppam_userlen);
   sstrncpy(sftppam_user, user, sftppam_userlen);
 
   c = find_config(main_server->conf, CONF_PARAM, "SFTPPAMOptions", FALSE);