From: Hanno Böck Date: Wed, 19 Apr 2017 12:00:21 +0000 (+0200) Subject: cleanupdb: Fix a memory read error X-Git-Tag: samba-4.6.3~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c13244a42c7cd4adeffa9c8125bcc5652e504b66;p=thirdparty%2Fsamba.git cleanupdb: Fix a memory read error Bug: https://bugzilla.samba.org/show_bug.cgi?id=12748 Signed-off-by: Hanno Böck Reviewed-by: Volker Lendecke Reviewed-by: Jeremy Allison Reviewed-by: Ralph Boehme (cherry picked from commit fd98a7b6a0053b62802e29fb729e219dc08eef6b) Autobuild-User(v4-6-test): Karolin Seeger Autobuild-Date(v4-6-test): Fri Apr 21 13:59:21 CEST 2017 on sn-devel-144 --- diff --git a/source3/lib/cleanupdb.c b/source3/lib/cleanupdb.c index 8832abe27d6..7bf7c7e7080 100644 --- a/source3/lib/cleanupdb.c +++ b/source3/lib/cleanupdb.c @@ -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();