The Samba-Bugzilla – Attachment 4214 Details for
Bug 6418
Uninitialized array in lookup_rid() can give random segfaults.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for 3.3 and 3.2
0001-s3-zero-an-uninitialized-array.patch (text/plain), 1.13 KB, created by
Jeremy Allison
on 2009-05-27 17:46:22 UTC
(
hide
)
Description:
Patch for 3.3 and 3.2
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2009-05-27 17:46:22 UTC
Size:
1.13 KB
patch
obsolete
>From 75de7c0e87cc5ecea1a7d7e9b0103a8cc2827895 Mon Sep 17 00:00:00 2001 >From: Marc VanHeyningen <marc.vanheyningen@isilon.com> >Date: Tue, 5 May 2009 22:07:40 +0000 >Subject: [PATCH] s3: zero an uninitialized array > >Invalid pointers were being dereferenced in lookup_sids causing >occasional seg faults. > >Signed-off-by: Tim Prouty <tprouty@samba.org> >--- > source3/passdb/lookup_sid.c | 5 ++++- > 1 files changed, 4 insertions(+), 1 deletions(-) > >diff --git a/source3/passdb/lookup_sid.c b/source3/passdb/lookup_sid.c >index b45000e..3a03cfe 100644 >--- a/source3/passdb/lookup_sid.c >+++ b/source3/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; >-- >1.6.0.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
jra
:
review+
Actions:
View
Attachments on
bug 6418
: 4214