From 0e9d03b06b0bd76b748dd4e15d20c77a1f8199f5 Mon Sep 17 00:00:00 2001 From: Ted Percival Date: Thu, 1 May 2008 21:43:41 +1000 Subject: [PATCH] Remove trailing '\n' from password & domain in credentials file Fixes bug #5434 --- source/client/mount.cifs.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/client/mount.cifs.c b/source/client/mount.cifs.c index 96ab4a8..ce0bfa4 100644 --- a/source/client/mount.cifs.c +++ b/source/client/mount.cifs.c @@ -249,7 +249,7 @@ static int open_cred_file(char * file_name) } else memset(mountpassword,0,MOUNT_PASSWD_SIZE); if(mountpassword) { - strlcpy(mountpassword,temp_val,MOUNT_PASSWD_SIZE+1); + strlcpy(mountpassword,temp_val,length+1); got_password = 1; } } @@ -276,7 +276,7 @@ static int open_cred_file(char * file_name) } else memset(domain_name,0,DOMAIN_SIZE); if(domain_name) { - strlcpy(domain_name,temp_val,DOMAIN_SIZE+1); + strlcpy(domain_name,temp_val,length+1); got_domain = 1; } } -- 1.5.5