The branch, master has been updated
       via  0c579bc... s3-net: Make sure that the data blob is initialized.
       via  f8b6ac6... s3-eventlog: Fixed the keyname delimiter for the 
registry key.
       via  378cd5d... s3-registry: Fixed keyname delimiter in 
KEY_CURRENT_VERSION_NORM.
       via  e716924... s3-smbd: Make sure that status is initialized when used.
       via  6ac050f... s3-lanman: Make sure count is not used uninitialized if 
we jump to out.
       via  d11e184... s3-vfs: Make sure that retval isn't used uninitialized.
       via  ac5600f... s3-passdb: Make sure dn is initialized and don't free it.
       via  6d89116... s3-passdb: Make sure we don't call free on a garbage 
pointer.
       via  06a1766... s3-lanman: Make sure that job_info is not undefined.
       via  459a1d5... s3-nmbd: Leave the sync function if there are no syncs.
       via  34de8a0... s3-libsmb: Make sure that finfo is initialized.
      from  b6100fa... s3-eventlog: make sure _eventlog_OpenEventLogW fails 
when we cannot open the registry key.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 0c579bc3e65388e22f4d4d52c6edcda71cf2cc06
Author: Andreas Schneider <[email protected]>
Date:   Mon Jun 28 12:54:11 2010 +0200

    s3-net: Make sure that the data blob is initialized.
    
    Found by clang-analyzer.

commit f8b6ac6a08138b247bb00ec1d238a56c9b2d13c7
Author: Andreas Schneider <[email protected]>
Date:   Mon Jun 28 11:48:15 2010 +0200

    s3-eventlog: Fixed the keyname delimiter for the registry key.

commit 378cd5dc3833c1e1c7d113b3b05b5c41135d6c1e
Author: Andreas Schneider <[email protected]>
Date:   Mon Jun 28 11:37:28 2010 +0200

    s3-registry: Fixed keyname delimiter in KEY_CURRENT_VERSION_NORM.

commit e716924590150faf1b0ec46a64c84d37eef0d526
Author: Andreas Schneider <[email protected]>
Date:   Mon Jun 28 11:19:18 2010 +0200

    s3-smbd: Make sure that status is initialized when used.
    
    Found by clang-analyzer.

commit 6ac050f73f7be0d49003e4c9053826620f5e3c6c
Author: Andreas Schneider <[email protected]>
Date:   Mon Jun 28 11:16:19 2010 +0200

    s3-lanman: Make sure count is not used uninitialized if we jump to out.
    
    Found by clang-analyzer.

commit d11e184ed25e6a89ecfbe24673008d7adf5e770a
Author: Andreas Schneider <[email protected]>
Date:   Mon Jun 28 11:13:24 2010 +0200

    s3-vfs: Make sure that retval isn't used uninitialized.
    
    Found by clang-analyzer.

commit ac5600fc7e996bdde23666bc96a834044556c85f
Author: Andreas Schneider <[email protected]>
Date:   Mon Jun 28 11:06:22 2010 +0200

    s3-passdb: Make sure dn is initialized and don't free it.
    
    dn is just a pointer to a memory which hasn't been duplicated.
    
    Found by clang-analyzer.

commit 6d89116afe89e29d4e9bd0d69f7032a2b47f4c07
Author: Andreas Schneider <[email protected]>
Date:   Mon Jun 28 10:58:08 2010 +0200

    s3-passdb: Make sure we don't call free on a garbage pointer.
    
    Found by clang-analyzer.

commit 06a1766315e775062ba5277be0f739e735cc3547
Author: Andreas Schneider <[email protected]>
Date:   Mon Jun 28 10:49:55 2010 +0200

    s3-lanman: Make sure that job_info is not undefined.
    
    Found by clang-analyzer.

commit 459a1d58b1b5f90320a843234067654959fab8b1
Author: Andreas Schneider <[email protected]>
Date:   Mon Jun 28 10:44:58 2010 +0200

    s3-nmbd: Leave the sync function if there are no syncs.
    
    Found by clang-analyzer.

commit 34de8a00dd69d8ffba98babf141f484da54a472a
Author: Andreas Schneider <[email protected]>
Date:   Mon Jun 28 10:33:47 2010 +0200

    s3-libsmb: Make sure that finfo is initialized.
    
    Found by clang-analyzer.

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

Summary of changes:
 source3/libsmb/clilist.c                       |    2 ++
 source3/modules/vfs_scannedonly.c              |    2 +-
 source3/nmbd/nmbd_browsesync.c                 |    5 +++++
 source3/passdb/pdb_ads.c                       |    6 ++----
 source3/registry/reg_backend_current_version.c |    2 +-
 source3/rpc_server/srv_eventlog_nt.c           |    2 +-
 source3/smbd/lanman.c                          |    4 ++--
 source3/smbd/smb2_lock.c                       |    2 +-
 source3/utils/net_rpc_printer.c                |    2 ++
 9 files changed, 17 insertions(+), 10 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/libsmb/clilist.c b/source3/libsmb/clilist.c
index 83b9eb1..93f67c7 100644
--- a/source3/libsmb/clilist.c
+++ b/source3/libsmb/clilist.c
@@ -260,6 +260,8 @@ int cli_list_new(struct cli_state *cli,const char 
*Mask,uint16 attribute,
                return -1;
        }
 
+       ZERO_STRUCT(finfo);
+
        while (ff_eos == 0) {
                size_t nlen = 2*(strlen(mask)+1);
 
diff --git a/source3/modules/vfs_scannedonly.c 
b/source3/modules/vfs_scannedonly.c
index 12077f3..679ecc8 100644
--- a/source3/modules/vfs_scannedonly.c
+++ b/source3/modules/vfs_scannedonly.c
@@ -377,7 +377,7 @@ static bool scannedonly_allow_access(vfs_handle_struct * 
handle,
        struct smb_filename *cache_smb_fname;
        TALLOC_CTX *ctx=talloc_tos();
        char *cachefile;
-       int retval;
+       int retval = -1;
        int didloop;
        DEBUG(SCANNEDONLY_DEBUG,
              ("smb_fname->base_name=%s, shortname=%s, base_name=%s\n"
diff --git a/source3/nmbd/nmbd_browsesync.c b/source3/nmbd/nmbd_browsesync.c
index b630fd2..73d953e 100644
--- a/source3/nmbd/nmbd_browsesync.c
+++ b/source3/nmbd/nmbd_browsesync.c
@@ -644,6 +644,11 @@ void sync_all_dmbs(time_t t)
                }
        }
 
+       /* leave if we don't have to do any syncs */
+       if (count == 0) {
+               return;
+       }
+
        /* sync with a probability of 1/count */
        for (work=unicast_subnet->workgrouplist; work; work = work->next) {
                if (strcmp(lp_workgroup(), work->work_group)) {
diff --git a/source3/passdb/pdb_ads.c b/source3/passdb/pdb_ads.c
index 722bfac..096063b 100644
--- a/source3/passdb/pdb_ads.c
+++ b/source3/passdb/pdb_ads.c
@@ -1190,7 +1190,7 @@ static NTSTATUS pdb_ads_delete_alias(struct pdb_methods 
*m,
                m->private_data, struct pdb_ads_state);
        struct tldap_context *ld;
        struct tldap_message **alias;
-       char *sidstr, *dn;
+       char *sidstr, *dn = NULL;
        int rc;
 
        ld = pdb_ads_ld(state);
@@ -1213,7 +1213,6 @@ static NTSTATUS pdb_ads_delete_alias(struct pdb_methods 
*m,
        if (rc != TLDAP_SUCCESS) {
                DEBUG(10, ("ldap_search failed: %s\n",
                           tldap_errstr(talloc_tos(), state->ld, rc)));
-               TALLOC_FREE(dn);
                return NT_STATUS_LDAP(rc);
        }
        if (talloc_array_length(alias) != 1) {
@@ -1231,7 +1230,6 @@ static NTSTATUS pdb_ads_delete_alias(struct pdb_methods 
*m,
        if (rc != TLDAP_SUCCESS) {
                DEBUG(10, ("ldap_delete failed: %s\n",
                           tldap_errstr(talloc_tos(), state->ld, rc)));
-               TALLOC_FREE(dn);
                return NT_STATUS_LDAP(rc);
        }
 
@@ -1536,7 +1534,7 @@ static NTSTATUS pdb_ads_enum_alias_memberships(struct 
pdb_methods *m,
        struct pdb_ads_state *state = talloc_get_type_abort(
                m->private_data, struct pdb_ads_state);
        const char *attrs[1] = { "objectSid" };
-       struct tldap_message **msg;
+       struct tldap_message **msg = NULL;
        uint32_t *alias_rids = NULL;
        size_t num_alias_rids = 0;
        int i, rc, count;
diff --git a/source3/registry/reg_backend_current_version.c 
b/source3/registry/reg_backend_current_version.c
index ee4131a..ab7bd51 100644
--- a/source3/registry/reg_backend_current_version.c
+++ b/source3/registry/reg_backend_current_version.c
@@ -34,7 +34,7 @@
 
 extern struct registry_ops regdb_ops;
 
-#define KEY_CURRENT_VERSION_NORM "HKLM/SOFTWARE/MICROSOFT/WINDOWS 
NT/CURRENTVERSION"
+#define KEY_CURRENT_VERSION_NORM "HKLM\\SOFTWARE\\MICROSOFT\\WINDOWS 
NT\\CURRENTVERSION"
 
 static int current_version_fetch_values(const char *key, struct regval_ctr 
*values)
 {
diff --git a/source3/rpc_server/srv_eventlog_nt.c 
b/source3/rpc_server/srv_eventlog_nt.c
index 701dcf0..241cbab 100644
--- a/source3/rpc_server/srv_eventlog_nt.c
+++ b/source3/rpc_server/srv_eventlog_nt.c
@@ -329,7 +329,7 @@ static bool sync_eventlog_params( EVENTLOG_INFO *info )
           to use the same fetch/store api that we use in
           srv_reg_nt.c */
 
-       path = talloc_asprintf(ctx, "%s/%s", KEY_EVENTLOG, elogname );
+       path = talloc_asprintf(ctx, "%s\\%s", KEY_EVENTLOG, elogname);
        if (!path) {
                goto done;
        }
diff --git a/source3/smbd/lanman.c b/source3/smbd/lanman.c
index 72d488e..ba51c61 100644
--- a/source3/smbd/lanman.c
+++ b/source3/smbd/lanman.c
@@ -774,7 +774,7 @@ static bool api_DosPrintQGetInfo(struct 
smbd_server_connection *sconn,
        struct policy_handle handle;
        struct spoolss_DevmodeContainer devmode_ctr;
        union spoolss_DriverInfo driver_info;
-       union spoolss_JobInfo *job_info;
+       union spoolss_JobInfo *job_info = NULL;
        union spoolss_PrinterInfo printer_info;
 
        if (!str1 || !str2 || !p) {
@@ -4706,7 +4706,7 @@ static bool api_WPrintJobEnumerate(struct 
smbd_server_connection *sconn,
        struct rpc_pipe_client *cli = NULL;
        struct policy_handle handle;
        struct spoolss_DevmodeContainer devmode_ctr;
-       uint32_t count;
+       uint32_t count = 0;
        union spoolss_JobInfo *info;
 
        if (!str1 || !str2 || !p) {
diff --git a/source3/smbd/smb2_lock.c b/source3/smbd/smb2_lock.c
index 94000b2..51cb5c6 100644
--- a/source3/smbd/smb2_lock.c
+++ b/source3/smbd/smb2_lock.c
@@ -720,7 +720,7 @@ static void remove_pending_lock(struct smbd_smb2_lock_state 
*state,
 static void reprocess_blocked_smb2_lock(struct smbd_smb2_request *smb2req,
                                struct timeval tv_curr)
 {
-       NTSTATUS status;
+       NTSTATUS status = NT_STATUS_UNSUCCESSFUL;
        struct blocking_lock_record *blr = NULL;
        struct smbd_smb2_lock_state *state = NULL;
        files_struct *fsp = NULL;
diff --git a/source3/utils/net_rpc_printer.c b/source3/utils/net_rpc_printer.c
index f98a623..b75b195 100644
--- a/source3/utils/net_rpc_printer.c
+++ b/source3/utils/net_rpc_printer.c
@@ -2424,6 +2424,8 @@ NTSTATUS rpc_printer_migrate_settings_internals(struct 
net_context *c,
                                struct regval_blob *value;
                                DATA_BLOB blob;
 
+                               ZERO_STRUCT(blob);
+
                                /* although samba replies with sane data in 
most cases we
                                   should try to avoid writing wrong registry 
data */
 


-- 
Samba Shared Repository

Reply via email to