[SCM] Samba Shared Repository - branch v3-2-test updated - initial-v3-2-test-2513-g19de47f

Volker Lendecke vl at samba.org
Mon Feb 25 08:48:49 GMT 2008


The branch, v3-2-test has been updated
       via  19de47fef1b35c47885acc40760a232e4643079c (commit)
      from  8f86f7f25c4eb71bbdfcc6bf2d12eaaae9a8d9ec (commit)

http://gitweb.samba.org/?samba.git;a=shortlog;h=v3-2-test


- Log -----------------------------------------------------------------
commit 19de47fef1b35c47885acc40760a232e4643079c
Author: Volker Lendecke <vl at samba.org>
Date:   Mon Feb 25 09:51:33 2008 +0100

    Fix confusing error message -- bug 5252
    
    Thanks to Walter Franzini

-----------------------------------------------------------------------

Summary of changes:
 source/client/mount.cifs.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/client/mount.cifs.c b/source/client/mount.cifs.c
index 44614f6..c68c9ee 100644
--- a/source/client/mount.cifs.c
+++ b/source/client/mount.cifs.c
@@ -205,8 +205,10 @@ static int open_cred_file(char * file_name)
 				/* go past equals sign */
 				temp_val++;
 				for(length = 0;length<4087;length++) {
-					if(temp_val[length] == '\n')
+					if ((temp_val[length] == '\n')
+					    || (temp_val[length] == '\0')) {
 						break;
+					}
 				}
 				if(length > 4086) {
 					printf("mount.cifs failed due to malformed username in credentials file");
@@ -229,7 +231,7 @@ static int open_cred_file(char * file_name)
 				/* go past equals sign */
 				temp_val++;
 				for(length = 0;length<65;length++) {
-					if(temp_val[length] == '\n')
+					if(temp_val[length] == '\n' || temp_val[length] == '\0')
 						break;
 				}
 				if(length > 64) {
@@ -258,7 +260,7 @@ static int open_cred_file(char * file_name)
 				if(verboseflag)
 					printf("\nDomain %s\n",temp_val);
                                 for(length = 0;length<65;length++) {
-                                        if(temp_val[length] == '\n')
+                                        if(temp_val[length] == '\n' || temp_val[length] == '\0')
                                                 break;
                                 }
                                 if(length > 64) {


-- 
Samba Shared Repository


More information about the samba-cvs mailing list