cleanupdb: Fix a memory read error
authorHanno Böck <hanno@hboeck.de>
Wed, 19 Apr 2017 12:00:21 +0000 (14:00 +0200)
committerKarolin Seeger <kseeger@samba.org>
Fri, 21 Apr 2017 11:59:21 +0000 (13:59 +0200)
Bug: https://bugzilla.samba.org/show_bug.cgi?id=12748

Signed-off-by: Hanno Böck <hanno@hboeck.de>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
(cherry picked from commit fd98a7b6a0053b62802e29fb729e219dc08eef6b)

Autobuild-User(v4-6-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-6-test): Fri Apr 21 13:59:21 CEST 2017 on sn-devel-144

source3/lib/cleanupdb.c

index 8832abe27d691c553e849a357da0de1063ff166e..7bf7c7e708082cca8c993a1406a0cfc9fd4df1ca 100644 (file)
@@ -61,7 +61,7 @@ bool cleanupdb_store_child(const pid_t pid, const bool unclean)
        struct cleanup_key key = { .pid = pid };
        struct cleanup_rec rec = { .pid = pid, .unclean = unclean };
        TDB_DATA tdbkey = { .dptr = (uint8_t *)&key, .dsize = sizeof(key) };
-       TDB_DATA tdbdata = { .dptr = (uint8_t *)&key, .dsize = sizeof(rec) };
+       TDB_DATA tdbdata = { .dptr = (uint8_t *)&rec, .dsize = sizeof(rec) };
        int result;
 
        db = cleanup_db();