git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cf167fe
)
Fix for tdb_oob() on TDB_INTERNAL databases.
author
Jeremy Allison
<jra@samba.org>
Fri, 12 Oct 2001 00:01:35 +0000
(
00:01
+0000)
committer
Jeremy Allison
<jra@samba.org>
Fri, 12 Oct 2001 00:01:35 +0000
(
00:01
+0000)
Jeremy.
(This used to be commit
2b135fba625191a13e4110c68531a0e6d5fb373d
)
source3/tdb/tdb.c
patch
|
blob
|
history
diff --git
a/source3/tdb/tdb.c
b/source3/tdb/tdb.c
index d0527919bc7067d3b13b9ba03e8b90dd56739adc..276715804611eb81f6bdd0392ab2ecb70b5c7a48 100644
(file)
--- 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);