summaryrefslogtreecommitdiff
path: root/source3/client/mount.cifs.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/client/mount.cifs.c')
-rw-r--r--source3/client/mount.cifs.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source3/client/mount.cifs.c b/source3/client/mount.cifs.c
index d1b735525e..c42375b574 100644
--- a/source3/client/mount.cifs.c
+++ b/source3/client/mount.cifs.c
@@ -213,6 +213,7 @@ static int open_cred_file(char * file_name)
for(length = 0;length<4087;length++) {
if ((temp_val[length] == '\n')
|| (temp_val[length] == '\0')) {
+ temp_val[length] = '\0';
break;
}
}
@@ -332,6 +333,7 @@ static int get_password_from_file(int file_descript, char * filename)
break;
} else /* read valid character */ {
if((c == 0) || (c == '\n')) {
+ mountpassword[i] = '\0';
break;
} else
mountpassword[i] = c;