The branch, master has been updated
       via  f1452a2 s3-libsmb: Initialise ticket to ensure we do not invalid 
memory
       via  049375e Move to talloc from malloc.
       via  e735b52 Fix mixup between talloc/malloc.
      from  e29a9f4 pyldb: Avoid using PyErr_LDB_ERROR_IS_ERR_RAISE where 
PyErr_SetLdbError suffices.

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


- Log -----------------------------------------------------------------
commit f1452a296429b79755235f4a480f0d5ea38ce178
Author: Andrew Bartlett <[email protected]>
Date:   Thu Mar 1 16:55:04 2012 +1100

    s3-libsmb: Initialise ticket to ensure we do not invalid memory
    
    The free is however a talloc_free(), which has additional protection against
    freeing the wrong thing.
    
    Andrew Bartlett
    
    Signed-off-by: Jeremy Allison <[email protected]>
    
    Autobuild-User: Jeremy Allison <[email protected]>
    Autobuild-Date: Fri Mar  2 01:45:19 CET 2012 on sn-devel-104

commit 049375ec51ef404e61963e1f6ba10c116fde9767
Author: Jeremy Allison <[email protected]>
Date:   Thu Mar 1 12:35:27 2012 -0800

    Move to talloc from malloc.

commit e735b5225402b930ccc8c7c8fa03b988c3371a11
Author: Jeremy Allison <[email protected]>
Date:   Thu Mar 1 10:57:17 2012 -0800

    Fix mixup between talloc/malloc.

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

Summary of changes:
 source3/libsmb/clifile.c   |   12 ++++++++----
 source3/libsmb/clispnego.c |    1 +
 2 files changed, 9 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/libsmb/clifile.c b/source3/libsmb/clifile.c
index 168dd4b..0c8a340 100644
--- a/source3/libsmb/clifile.c
+++ b/source3/libsmb/clifile.c
@@ -4185,7 +4185,9 @@ static NTSTATUS cli_set_ea(struct cli_state *cli, 
uint16_t setup_val,
 
        if (ea_namelen == 0 && ea_len == 0) {
                data_len = 4;
-               data = (uint8_t *)SMB_MALLOC(data_len);
+               data = talloc_array(talloc_tos(),
+                               uint8_t,
+                               data_len);
                if (!data) {
                        return NT_STATUS_NO_MEMORY;
                }
@@ -4193,7 +4195,9 @@ static NTSTATUS cli_set_ea(struct cli_state *cli, 
uint16_t setup_val,
                SIVAL(p,0,data_len);
        } else {
                data_len = 4 + 4 + ea_namelen + 1 + ea_len;
-               data = (uint8_t *)SMB_MALLOC(data_len);
+               data = talloc_array(talloc_tos(),
+                               uint8_t,
+                               data_len);
                if (!data) {
                        return NT_STATUS_NO_MEMORY;
                }
@@ -4215,7 +4219,7 @@ static NTSTATUS cli_set_ea(struct cli_state *cli, 
uint16_t setup_val,
                           NULL, 0, NULL, /* rsetup */
                           NULL, 0, NULL, /* rparam */
                           NULL, 0, NULL); /* rdata */
-       SAFE_FREE(data);
+       talloc_free(data);
        return status;
 }
 
@@ -4247,7 +4251,7 @@ NTSTATUS cli_set_ea_path(struct cli_state *cli, const 
char *path,
 
        status = cli_set_ea(cli, TRANSACT2_SETPATHINFO, param, param_len,
                            ea_name, ea_val, ea_len);
-       SAFE_FREE(frame);
+       talloc_free(frame);
        return status;
 }
 
diff --git a/source3/libsmb/clispnego.c b/source3/libsmb/clispnego.c
index 2cc2a2a..bf3fac6 100644
--- a/source3/libsmb/clispnego.c
+++ b/source3/libsmb/clispnego.c
@@ -255,6 +255,7 @@ bool spnego_parse_krb5_wrap(TALLOC_CTX *ctx, DATA_BLOB 
blob, DATA_BLOB *ticket,
        bool ret;
        ASN1_DATA *data;
        int data_remaining;
+       *ticket = data_blob_null;
 
        data = asn1_init(talloc_tos());
        if (data == NULL) {


-- 
Samba Shared Repository

Reply via email to