[SCM] Samba Shared Repository - branch master updated

Volker Lendecke vlendec at samba.org
Tue May 15 16:00:02 MDT 2012


The branch, master has been updated
       via  18e2e86 libwbclient: Fix an invalid free()
       via  e5825ab wbinfo: Fix Coverity ID 242684 Resource leak
       via  c5eab2e wbinfo: Fix Coverity ID 242685 Resource leak
       via  fc77ee5 s3: Fix Coverity ID 242710 Untrusted pointer read
       via  2298622 dbwrap: Fix Coverity ID 242750 Incorrect sizeof expression
      from  5f494c4 libcli/smb: move smb2cli_ioctl.c from source3 to the toplevel

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


- Log -----------------------------------------------------------------
commit 18e2e86c083fa1a24056e691a755bc45a35547d1
Author: Volker Lendecke <vl at samba.org>
Date:   Tue May 15 19:58:26 2012 +0200

    libwbclient: Fix an invalid free()
    
    Autobuild-User: Volker Lendecke <vl at samba.org>
    Autobuild-Date: Wed May 16 00:00:00 CEST 2012 on sn-devel-104

commit e5825ab22de75315e1af9cc58e79b9e2c3896226
Author: Volker Lendecke <vl at samba.org>
Date:   Tue May 15 19:49:31 2012 +0200

    wbinfo: Fix Coverity ID 242684 Resource leak

commit c5eab2e9acb66c0a8c48ababc0e495adb415aeeb
Author: Volker Lendecke <vl at samba.org>
Date:   Tue May 15 19:48:42 2012 +0200

    wbinfo: Fix Coverity ID 242685 Resource leak

commit fc77ee51717d3ca8e7d50ff46f2738cee475a84f
Author: Volker Lendecke <vl at samba.org>
Date:   Tue May 15 19:26:48 2012 +0200

    s3: Fix Coverity ID 242710 Untrusted pointer read
    
    According to susv3 we have to make sure that we call isupper with
    values only in the range of an unsigned char. This is best achieved
    by automatic narrowing through assignment.

commit 229862224301e3fa3fc30cd495a7ff9ee7ca4b60
Author: Volker Lendecke <vl at samba.org>
Date:   Tue May 15 18:51:06 2012 +0200

    dbwrap: Fix Coverity ID 242750 Incorrect sizeof expression
    
    Taking the size of "db" is correct, but a bit fishy. Silence Coverity.

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

Summary of changes:
 lib/dbwrap/dbwrap_rbt.c            |    2 +-
 nsswitch/libwbclient/wbc_sid.c     |    2 +-
 nsswitch/wbinfo.c                  |    2 ++
 source3/utils/net_registry_check.c |    2 +-
 4 files changed, 5 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/dbwrap/dbwrap_rbt.c b/lib/dbwrap/dbwrap_rbt.c
index c25ea6e..d468953 100644
--- a/lib/dbwrap/dbwrap_rbt.c
+++ b/lib/dbwrap/dbwrap_rbt.c
@@ -411,7 +411,7 @@ static int db_rbt_trans_dummy(struct db_context *db)
 static void db_rbt_id(struct db_context *db, const uint8_t **id, size_t *idlen)
 {
 	*id = (uint8_t *)db;
-	*idlen = sizeof(db);
+	*idlen = sizeof(struct db_context *);
 }
 
 struct db_context *db_open_rbt(TALLOC_CTX *mem_ctx)
diff --git a/nsswitch/libwbclient/wbc_sid.c b/nsswitch/libwbclient/wbc_sid.c
index 6df8a3c..bab6933 100644
--- a/nsswitch/libwbclient/wbc_sid.c
+++ b/nsswitch/libwbclient/wbc_sid.c
@@ -295,7 +295,7 @@ static void wbcTranslatedNamesDestructor(void *ptr)
 	struct wbcTranslatedName *n = (struct wbcTranslatedName *)ptr;
 
 	while (n->name != NULL) {
-		free(n->name);
+		wbcFreeMemory(n->name);
 		n += 1;
 	}
 }
diff --git a/nsswitch/wbinfo.c b/nsswitch/wbinfo.c
index e7f902f..3f7036d 100644
--- a/nsswitch/wbinfo.c
+++ b/nsswitch/wbinfo.c
@@ -1389,6 +1389,8 @@ static bool wbinfo_lookup_sids(const char *arg)
 			 domains[names[i].domain_index].short_name,
 			 names[i].name, names[i].type);
 	}
+	wbcFreeMemory(names);
+	wbcFreeMemory(domains);
 	return true;
 }
 
diff --git a/source3/utils/net_registry_check.c b/source3/utils/net_registry_check.c
index 8d1a91c..6e455db 100644
--- a/source3/utils/net_registry_check.c
+++ b/source3/utils/net_registry_check.c
@@ -788,7 +788,7 @@ static int check_tdb_action(struct db_record *rec, void *check_ctx)
 		}
 
 		if (invalid_path) {
-			int action;
+			unsigned char action;
 			if (ctx->opt.output == NULL) {
 				action = first_iter ? 'r' : 's';
 			} else if (ctx->opt.automatic) {


-- 
Samba Shared Repository


More information about the samba-cvs mailing list