From 3cfd1f2be74cedfd70569ae004b57ef1f877fb1a Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 1 May 2008 08:48:52 -0700 Subject: Tidyup to ensure '\n' is treated identically in all cases. Jeremy. (This used to be commit 818fbc9889af8c9fb6e7978e8ed2269a78f14404) --- source3/client/mount.cifs.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source3/client/mount.cifs.c') 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; -- cgit