aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve French <sfrench@us.ibm.com>2011-07-12 14:24:43 -0400
committerSteve French <sfrench@us.ibm.com>2011-07-12 15:14:24 -0400
commitea1be1a3c3c4b2bbc32aeb7995e18336c8060e0e (patch)
treeb9f057cb63be2fb16a48c5e1a0214dd4089d84c1
parent62411ab2fe5f002dff27417630ddf02cc40ca404 (diff)
[CIFS] update limit for snprintf in cifs_construct_tcon
In 34c87901e113 "Shrink stack space usage in cifs_construct_tcon" we change the size of the username name buffer from MAX_USERNAME_SIZE (256) to 28. This call to snprintf() needs to be updated as well. Reported by Dan Carpenter. Reviewed-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
-rw-r--r--fs/cifs/connect.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index dbd669cc5bc7..ccc1afa0bf3b 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -3485,7 +3485,7 @@ cifs_construct_tcon(struct cifs_sb_info *cifs_sb, uid_t fsuid)
3485 goto out; 3485 goto out;
3486 } 3486 }
3487 3487
3488 snprintf(username, MAX_USERNAME_SIZE, "krb50x%x", fsuid); 3488 snprintf(username, sizeof(username), "krb50x%x", fsuid);
3489 vol_info->username = username; 3489 vol_info->username = username;
3490 vol_info->local_nls = cifs_sb->local_nls; 3490 vol_info->local_nls = cifs_sb->local_nls;
3491 vol_info->linux_uid = fsuid; 3491 vol_info->linux_uid = fsuid;