summaryrefslogtreecommitdiff
path: root/source3/tdb
diff options
context:
space:
mode:
Diffstat (limited to 'source3/tdb')
-rw-r--r--source3/tdb/tdb.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/source3/tdb/tdb.c b/source3/tdb/tdb.c
index d0527919bc..2767158046 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);