From 754c2feee77d9ce0f8de666692f5ffc2cfb11b8a Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 12 Oct 2001 00:01:35 +0000 Subject: Fix for tdb_oob() on TDB_INTERNAL databases. Jeremy. (This used to be commit 2b135fba625191a13e4110c68531a0e6d5fb373d) --- source3/tdb/tdb.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'source3') diff --git a/source3/tdb/tdb.c b/source3/tdb/tdb.c index d0527919bc7..27671580461 100644 --- a/source3/tdb/tdb.c +++ b/source3/tdb/tdb.c @@ -252,8 +252,13 @@ static int tdb_oob(TDB_CONTEXT *tdb, tdb_off len, int probe) struct stat st; if (len <= tdb->map_size) return 0; - if (tdb->flags & TDB_INTERNAL) - return 0; + if (tdb->flags & TDB_INTERNAL) { + if (!probe) { + TDB_LOG((tdb, 0,"tdb_oob len %d beyond internal malloc size %d\n", + (int)len, (int)tdb->map_size)); + } + return TDB_ERRCODE(TDB_ERR_IO, -1); + } if (fstat(tdb->fd, &st) == -1) return TDB_ERRCODE(TDB_ERR_IO, -1); -- cgit