1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-04 17:47:26 +03:00

fixed a crash bug in the new transaction code

(This used to be ctdb commit 0d298e863c8ab2945fd329661c09ec6889152326)
This commit is contained in:
Andrew Tridgell 2008-01-31 09:18:26 +11:00
parent feb7c05734
commit 1c35c8243e

View File

@ -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;
}