diff options
author | Michael Adam <obnox@samba.org> | 2008-07-09 12:48:05 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2008-07-09 12:59:37 +0200 |
commit | c09b42746411138d9cb16eb69fe78c3a2826924e (patch) | |
tree | 8b48b230011eef44ac164dd0582a01503f1d3d5f /source3 | |
parent | f587e0310c802109f2647fc8637db4b01c6a49d3 (diff) | |
download | samba-c09b42746411138d9cb16eb69fe78c3a2826924e.tar.gz samba-c09b42746411138d9cb16eb69fe78c3a2826924e.tar.bz2 samba-c09b42746411138d9cb16eb69fe78c3a2826924e.zip |
Revert "tdbtool: fix off-by-one error in argument length. (bug #2344)"
This reverts commit fafb8ad2b81b9a46cf8259bedc1dca5023b06115.
This fix is not valid:
1. convert_string() is not only used for key strings but also for data.
2. Some databases use string_tdb_data() i.e. non-null-terminated strings
as keynames and others (like the one I was using), use
string_term_tdb_data(), i.e. zero-terminated key strings.
After discussion with Metze, the easiest (and proper way) to
handle this is to specify key names as "keyname\0" for databases
which use string_term_tdb_data().
Sorry for the noise...
Michael
(cherry picked from commit 17c012c4645f4e9542537c15f80d9b4e74304d11)
(This used to be commit 42c953c106b3da90e8c3452c4a246392502c200d)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/lib/tdb/tools/tdbtool.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/lib/tdb/tools/tdbtool.c b/source3/lib/tdb/tools/tdbtool.c index 500e441c6a..d104ccd7c4 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 + 1; + *sizep = length; return instring; } |