summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-07-09 12:48:05 +0200
committerMichael Adam <obnox@samba.org>2008-07-09 12:57:56 +0200
commit1db2c047276fd9ba491c2ae45b81b50c6721b6b2 (patch)
treeaaf210d0581c90e97b5afb71acab7d9b76350538 /source4
parent6ae40a8b74aadcd6f1ead5c141e39c160b773546 (diff)
downloadsamba-1db2c047276fd9ba491c2ae45b81b50c6721b6b2.tar.gz
samba-1db2c047276fd9ba491c2ae45b81b50c6721b6b2.tar.bz2
samba-1db2c047276fd9ba491c2ae45b81b50c6721b6b2.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 (This used to be commit 17c012c4645f4e9542537c15f80d9b4e74304d11)
Diffstat (limited to 'source4')
-rw-r--r--source4/lib/tdb/tools/tdbtool.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source4/lib/tdb/tools/tdbtool.c b/source4/lib/tdb/tools/tdbtool.c
index 500e441c6a..d104ccd7c4 100644
--- a/source4/lib/tdb/tools/tdbtool.c
+++ b/source4/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;
}