ldb_tdb: A more robust check for if we can fit the index string in
authorAndrew Bartlett <abartlet@samba.org>
Wed, 4 Apr 2018 02:00:57 +0000 (14:00 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 6 Apr 2018 00:08:44 +0000 (02:08 +0200)
commit556466e7e3bed0edd8cd15e58dd4380f13c14364
tree2f82e410ededdda685d760fc03711f5716a82174
parentd161a6dcfef09ad939df76c5c77eb8b7519a9326
ldb_tdb: A more robust check for if we can fit the index string in

This avoids magic numbers and also is careful against overflow
from a long attr_for_dn.

This is done as a distinct commit to make the previous behaviour
change more clear, and to show that this does not change the
calculations, only improves the overflow check.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
lib/ldb/ldb_tdb/ldb_index.c