[SCM] Samba Shared Repository - branch v3-2-test updated - release-3-2-0pre2-124-g6f65390

Derrell Lipman derrell.lipman at unwireduniverse.com
Thu Mar 6 14:01:35 GMT 2008


The branch, v3-2-test has been updated
       via  6f65390cec218a6aac4370ee381f30439617dcec (commit)
      from  3a0f781352f364ce625a35ffd78257b27d984c47 (commit)

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


- Log -----------------------------------------------------------------
commit 6f65390cec218a6aac4370ee381f30439617dcec
Author: Derrell Lipman <derrell.lipman at unwireduniverse.com>
Date:   Thu Mar 6 09:00:37 2008 -0500

    Check for NULL pointers before dereferencing them.

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

Summary of changes:
 source/libsmb/libsmb_server.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/libsmb/libsmb_server.c b/source/libsmb/libsmb_server.c
index 64eb1ea..37612c6 100644
--- a/source/libsmb/libsmb_server.c
+++ b/source/libsmb/libsmb_server.c
@@ -144,6 +144,10 @@ SMBC_find_server(TALLOC_CTX *ctx,
         SMBCSRV *srv;
         int auth_called = 0;
         
+        if (!pp_workgroup || !pp_username || !pp_password) {
+                return NULL;
+        }
+                
 check_server_cache:
         
 	srv = smbc_getFunctionGetCachedServer(context)(context,
@@ -156,10 +160,6 @@ check_server_cache:
 		SMBC_call_auth_fn(ctx, context, server, share,
                                   pp_workgroup, pp_username, pp_password);
                 
-		if (!pp_workgroup || !pp_username || !pp_password) {
-			return NULL;
-		}
-                
 		/*
                  * However, smbc_auth_fn may have picked up info relating to
                  * an existing connection, so try for an existing connection


-- 
Samba Shared Repository


More information about the samba-cvs mailing list