The Samba-Bugzilla – Attachment 10430 Details for
Bug 10933
net ads join -k can segfault with existing keytab entries
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
use talloc_zero_array for keytab array
patch (text/plain), 1.10 KB, created by
Guenther Deschner
on 2014-11-12 16:28:11 UTC
(
hide
)
Description:
use talloc_zero_array for keytab array
Filename:
MIME Type:
Creator:
Guenther Deschner
Created:
2014-11-12 16:28:11 UTC
Size:
1.10 KB
patch
obsolete
>From f1bde6a617471740e895aacc2e679b0f2d0c07a5 Mon Sep 17 00:00:00 2001 >From: Matt Rogers <mrogers@redhat.com> >Date: Wed, 12 Nov 2014 17:21:05 +0100 >Subject: [PATCH] s3-keytab: fix keytab array NULL termination. > >Signed-off-by: Matt Rogers <mrogers@redhat.com> >Reviewed-by: Guenther Deschner <gd@samba.org> >--- > source3/libads/kerberos_keytab.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > >diff --git a/source3/libads/kerberos_keytab.c b/source3/libads/kerberos_keytab.c >index 43c755c..ae3d80e39 100644 >--- a/source3/libads/kerberos_keytab.c >+++ b/source3/libads/kerberos_keytab.c >@@ -667,14 +667,13 @@ int ads_keytab_create_default(ADS_STRUCT *ads) > goto done; > } > >- oldEntries = talloc_array(frame, char *, found); >+ oldEntries = talloc_zero_array(frame, char *, found + 1); > if (!oldEntries) { > DEBUG(1, (__location__ ": Failed to allocate space to store " > "the old keytab entries (talloc failed?).\n")); > ret = -1; > goto done; > } >- memset(oldEntries, '\0', found * sizeof(char *)); > > ret = krb5_kt_start_seq_get(context, keytab, &cursor); > if (ret == KRB5_KT_END || ret == ENOENT) { >-- >1.9.3 >
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:
asn
:
review+
gd
:
review+
Actions:
View
Attachments on
bug 10933
: 10430