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

Karolin Seeger kseeger at samba.org
Thu May 28 10:40:12 GMT 2009


The branch, v3-3-test has been updated
       via  34ca12c9396f7c8475cd1525bdbc40021b0e533f (commit)
      from  7e4682d0b54ba85c7366e7232b148a594718f7cf (commit)

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


- Log -----------------------------------------------------------------
commit 34ca12c9396f7c8475cd1525bdbc40021b0e533f
Author: Marc VanHeyningen <marc.vanheyningen at isilon.com>
Date:   Tue May 5 22:07:40 2009 +0000

    s3: zero an uninitialized array
    
    Invalid pointers were being dereferenced in lookup_sids causing
    occasional seg faults.
    
    Signed-off-by: Tim Prouty <tprouty at samba.org>

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

Summary of changes:
 source/passdb/lookup_sid.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/passdb/lookup_sid.c b/source/passdb/lookup_sid.c
index f4fc7b5..25dd73e 100644
--- a/source/passdb/lookup_sid.c
+++ b/source/passdb/lookup_sid.c
@@ -468,12 +468,15 @@ static bool lookup_rids(TALLOC_CTX *mem_ctx, const DOM_SID *domain_sid,
 		   sid_string_dbg(domain_sid)));
 
 	if (num_rids) {
-		*names = TALLOC_ARRAY(mem_ctx, const char *, num_rids);
+		*names = TALLOC_ZERO_ARRAY(mem_ctx, const char *, num_rids);
 		*types = TALLOC_ARRAY(mem_ctx, enum lsa_SidType, num_rids);
 
 		if ((*names == NULL) || (*types == NULL)) {
 			return false;
 		}
+
+		for (i = 0; i < num_rids; i++)
+			(*types)[i] = SID_NAME_UNKNOWN;
 	} else {
 		*names = NULL;
 		*types = NULL;


-- 
Samba Shared Repository


More information about the samba-cvs mailing list