From 92b5ff39b17e4d07e78c285991027745ad6e2e13 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 1 May 2008 08:49:18 -0700 Subject: [PATCH] Tidyup to ensure '\n' is treated identically in all cases. Karolin please pull for 3.2-stable. Jeremy. --- source/client/mount.cifs.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/client/mount.cifs.c b/source/client/mount.cifs.c index d1b735525e9..c42375b5743 100644 --- a/source/client/mount.cifs.c +++ b/source/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; -- 2.34.1