The branch, master has been updated via a0bad13 ldb_ldif: avoid strlen(NULL) from ce518f3 ldb_ldif: be less horribly efficient in debugging
https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit a0bad1364a9403afc5f457bf71a1eae48ab7b54e Author: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Date: Fri Oct 19 10:21:21 2018 +1300 ldb_ldif: avoid strlen(NULL) Signed-off-by: Douglas Bagnall <douglas.bagn...@catalyst.net.nz> Reviewed-by: Martin Schwenke <mar...@meltin.net> Autobuild-User(master): Martin Schwenke <mart...@samba.org> Autobuild-Date(master): Fri Oct 19 03:43:58 CEST 2018 on sn-devel-144 ----------------------------------------------------------------------- Summary of changes: lib/ldb/common/ldb_ldif.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Changeset truncated at 500 lines: diff --git a/lib/ldb/common/ldb_ldif.c b/lib/ldb/common/ldb_ldif.c index ec1859b..e694678 100644 --- a/lib/ldb/common/ldb_ldif.c +++ b/lib/ldb/common/ldb_ldif.c @@ -313,7 +313,7 @@ static int ldb_ldif_write_trace(struct ldb_context *ldb, for (i=0;i<msg->num_elements;i++) { const struct ldb_schema_attribute *a; - size_t namelen = strlen(msg->elements[i].name); + size_t namelen; if (msg->elements[i].name == NULL) { ldb_debug(ldb, LDB_DEBUG_ERROR, @@ -322,6 +322,7 @@ static int ldb_ldif_write_trace(struct ldb_context *ldb, return -1; } + namelen = strlen(msg->elements[i].name); a = ldb_schema_attribute_by_name(ldb, msg->elements[i].name); if (ldif->changetype == LDB_CHANGETYPE_MODIFY) { -- Samba Shared Repository