summaryrefslogtreecommitdiff
path: root/source4/lib/tdb/common
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2008-01-31 09:48:46 +1100
committerAndrew Tridgell <tridge@samba.org>2008-01-31 09:48:46 +1100
commit3a3ff8ebe7b7de24a7d3e2c9dd105d9fbeeb5d42 (patch)
tree8f446a67e00dccd5d4a83c397f3025e69bcb7679 /source4/lib/tdb/common
parent98d2b00dbe08b1303858be5f85704fa4bd1e7233 (diff)
downloadsamba-3a3ff8ebe7b7de24a7d3e2c9dd105d9fbeeb5d42.tar.gz
samba-3a3ff8ebe7b7de24a7d3e2c9dd105d9fbeeb5d42.tar.bz2
samba-3a3ff8ebe7b7de24a7d3e2c9dd105d9fbeeb5d42.zip
merged tdb transaction fix
(This used to be commit eb3af24926977208a8099c848a510704d2ae3524)
Diffstat (limited to 'source4/lib/tdb/common')
-rw-r--r--source4/lib/tdb/common/transaction.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source4/lib/tdb/common/transaction.c b/source4/lib/tdb/common/transaction.c
index c3e7a4e2c0..4e2127be64 100644
--- a/source4/lib/tdb/common/transaction.c
+++ b/source4/lib/tdb/common/transaction.c
@@ -321,6 +321,9 @@ static int transaction_write_existing(struct tdb_context *tdb, tdb_off_t off,
if (blk == tdb->transaction->num_blocks-1 &&
off + len > tdb->transaction->last_block_size) {
+ if (off >= tdb->transaction->last_block_size) {
+ return 0;
+ }
len = tdb->transaction->last_block_size - off;
}