[PATCH] Prepare for LMDB by improving ldb_tdb and Samba callers

jim jim.brown at rsmas.miami.edu
Wed Apr 4 00:07:32 UTC 2018


This should be either < 5 or <= 4. A key length of 0 is not useful 
(after subtracting 4).
Error message should also be changed to match if test.

On 4/3/2018 7:43 PM, Andrew Bartlett via samba-technical wrote:
> diff --git a/lib/ldb/ldb_tdb/ldb_index.c b/lib/ldb/ldb_tdb/ldb_index.c
> index 076db10f2dd..ccbc6443b81 100644
> --- a/lib/ldb/ldb_tdb/ldb_index.c
> +++ b/lib/ldb/ldb_tdb/ldb_index.c
> @@ -848,6 +848,18 @@ static struct ldb_dn *ltdb_index_key(struct ldb_context *ldb,
>   	unsigned indx_len = 0;
>   	unsigned frmt_len = 0;
>   
> +	if (max_key_length < 4) {
> +		ldb_asprintf_errstring(
> +			ldb,
> +			__location__ ": max_key_length of (%u) < 4",




More information about the samba-technical mailing list