diff options
Diffstat (limited to 'source4/lib/tdb/common/io.c')
-rw-r--r-- | source4/lib/tdb/common/io.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source4/lib/tdb/common/io.c b/source4/lib/tdb/common/io.c index e9d4e87ac8..355f76962f 100644 --- a/source4/lib/tdb/common/io.c +++ b/source4/lib/tdb/common/io.c @@ -97,6 +97,10 @@ static int tdb_oob(struct tdb_context *tdb, tdb_off_t len, int probe) static int tdb_write(struct tdb_context *tdb, tdb_off_t off, const void *buf, tdb_len_t len) { + if (len == 0) { + return 0; + } + if (tdb->read_only || tdb->traverse_read) { tdb->ecode = TDB_ERR_RDONLY; return -1; |