[SCM] Samba Shared Repository - branch v4-0-test updated

Karolin Seeger kseeger at samba.org
Mon Dec 3 03:19:05 MST 2012


The branch, v4-0-test has been updated
       via  e42fef3 WHATSNEW: Update changes since rc5.
       via  5b1aeb6 dbwrap: Fix bug 9440: Do not rely on dbwrap_record_get_value to return a talloc object
      from  121157a WHATSNEW: Update changes since RC5.

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


- Log -----------------------------------------------------------------
commit e42fef39ebc2f02fe574fa9ee81d7322da5d1eec
Author: Karolin Seeger <kseeger at samba.org>
Date:   Mon Dec 3 09:29:53 2012 +0100

    WHATSNEW: Update changes since rc5.
    
    Karolin
    
    Autobuild-User(v4-0-test): Karolin Seeger <kseeger at samba.org>
    Autobuild-Date(v4-0-test): Mon Dec  3 11:18:06 CET 2012 on sn-devel-104

commit 5b1aeb6703f941a240cf7e7b58375d3b9c380b4a
Author: Volker Lendecke <vl at samba.org>
Date:   Thu Nov 29 16:45:15 2012 +0100

    dbwrap: Fix bug 9440: Do not rely on dbwrap_record_get_value to return a talloc object
    
    db_tdb_fetch_locked returns the value as part of a larger talloc object
    that also contains the key.  This means we can not realloc, but have to
    freshly alloc.
    
    Reviewed-by: Michael Adam <obnox at samba.org>
    
    Autobuild-User(master): Michael Adam <obnox at samba.org>
    Autobuild-Date(master): Thu Nov 29 20:21:51 CET 2012 on sn-devel-104
    (cherry picked from commit 2f38a77a2dfc72ccd94f5027807c9484dae54358)

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

Summary of changes:
 WHATSNEW.txt                      |    2 ++
 source3/lib/dbwrap/dbwrap_watch.c |    5 +++--
 2 files changed, 5 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index a08909a..0f4e981 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -202,6 +202,8 @@ o   Amitay Isaacs <amitay at gmail.com>
 
 o   Volker Lendecke <vl at samba.org>
     * BUG 9422: Large read requests cause server to issue malformed reply.
+    * BUG 9440: Do not rely on dbwrap_record_get_value to return a talloc
+      object.
 
 
 o   Stefan Metzmacher <metze at samba.org>
diff --git a/source3/lib/dbwrap/dbwrap_watch.c b/source3/lib/dbwrap/dbwrap_watch.c
index 701ac9d..d7392a3 100644
--- a/source3/lib/dbwrap/dbwrap_watch.c
+++ b/source3/lib/dbwrap/dbwrap_watch.c
@@ -119,12 +119,13 @@ static NTSTATUS dbwrap_record_add_watcher(TDB_DATA w_key, struct server_id id)
 	ids = (struct server_id *)value.dptr;
 	num_ids = value.dsize / sizeof(struct server_id);
 
-	ids = talloc_realloc(talloc_tos(), ids, struct server_id,
-			     num_ids + 1);
+	ids = talloc_array(talloc_tos(), struct server_id,
+			   num_ids + 1);
 	if (ids == NULL) {
 		status = NT_STATUS_NO_MEMORY;
 		goto fail;
 	}
+	memcpy(ids, value.dptr, value.dsize);
 	ids[num_ids] = id;
 	num_ids += 1;
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list