summaryrefslogtreecommitdiff
path: root/source3/lib/tdb/tools
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-07-08 15:33:36 +0200
committerMichael Adam <obnox@samba.org>2008-07-08 15:56:28 +0200
commit932bc95a13add99b72228cb8e92b093a5c569bce (patch)
tree9fbec4dad80d73e298ec0de4a286f290abcbe9f5 /source3/lib/tdb/tools
parent973abc0dd66d2d1c417b681b0d50b8e23cb6b104 (diff)
downloadsamba-932bc95a13add99b72228cb8e92b093a5c569bce.tar.gz
samba-932bc95a13add99b72228cb8e92b093a5c569bce.tar.bz2
samba-932bc95a13add99b72228cb8e92b093a5c569bce.zip
tdbtool: fix off-by-one error in argument length. (bug #2344)
This prevented all commands operating on keys (all non-traverse commands) in tdbtool to fail with a "fetch failed" or "delete failed" message. It seems that it fixes bug #2344 ... Apparently this bug was introduced with 94e53472666ed in 2005. Either nobody is using tdbtool or else tdb_find() has become more strict about the key legth in the meantime. :-) Michael (This used to be commit 9be6b46f7715cdc7f77308d7613e8df73effe3c1)
Diffstat (limited to 'source3/lib/tdb/tools')
-rw-r--r--source3/lib/tdb/tools/tdbtool.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/lib/tdb/tools/tdbtool.c b/source3/lib/tdb/tools/tdbtool.c
index d104ccd7c4..500e441c6a 100644
--- a/source3/lib/tdb/tools/tdbtool.c
+++ b/source3/lib/tdb/tools/tdbtool.c
@@ -598,7 +598,7 @@ static char *convert_string(char *instring, size_t *sizep)
}
length++;
}
- *sizep = length;
+ *sizep = length + 1;
return instring;
}