mirror of
https://github.com/samba-team/samba.git
synced 2024-12-28 07:21:54 +03:00
Revert "tdbtool: fix off-by-one error in argument length. (bug #2344)"
This reverts commitfafb8ad2b8
. 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 commit17c012c464
) (This used to be commit42c953c106
)
This commit is contained in:
parent
f587e0310c
commit
c09b427464
@ -598,7 +598,7 @@ static char *convert_string(char *instring, size_t *sizep)
|
||||
}
|
||||
length++;
|
||||
}
|
||||
*sizep = length + 1;
|
||||
*sizep = length;
|
||||
return instring;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user