From: Jeremy Allison Date: Thu, 1 May 2008 15:48:52 +0000 (-0700) Subject: Tidyup to ensure '\n' is treated identically in all X-Git-Tag: samba-4.0.0alpha6~801^2~1545 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3cfd1f2be74cedfd70569ae004b57ef1f877fb1a;p=thirdparty%2Fsamba.git Tidyup to ensure '\n' is treated identically in all cases. Jeremy. (This used to be commit 818fbc9889af8c9fb6e7978e8ed2269a78f14404) --- diff --git a/source3/client/mount.cifs.c b/source3/client/mount.cifs.c index d1b735525e9..c42375b5743 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;