[SCM] Samba Shared Repository - branch master updated
Noel Power
npower at samba.org
Mon Jul 8 11:05:02 UTC 2019
The branch, master has been updated
via 6b96ae8316b auth/kerberos: clang: Fix same instances of 'Value stored is never read'
via d54f9aaf81e s4/dsdb/schema: clang: Fix Array access results in null pointer deref
via 50a22849ce1 s4/dsdb/schema: Fix 'Value stored to 'ret' is never read'
via 109b4381815 s4/dsdb/schema: Fix Access to field results in deference of null pointer
via 96e00a52587 s3/lib: Fix Access to field results in dereference of NULL pointer
via 17ce70d6d9c lib/param: clang: Fix Value stored is never read
via d759f4aa4b8 lib/util: clang: Fix 'Null pointer passed as an argument'
from f3e4a0d904a WHATSNEW: changed default/deprecation of allocation roundup size
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 6b96ae8316b748372819b0eabaee5c5e2a997d69
Author: Noel Power <noel.power at suse.com>
Date: Thu Jul 4 11:54:18 2019 +0000
auth/kerberos: clang: Fix same instances of 'Value stored is never read'
Fixes:
auth/kerberos/gssapi_pac.c:136:3: warning: Value stored to 'gss_maj' is never read <--[clang]
gss_maj = gss_release_buffer(&gss_min, &pac_buffer);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
auth/kerberos/gssapi_pac.c:137:3: warning: Value stored to 'gss_maj' is never read <--[clang]
gss_maj = gss_release_buffer(&gss_min, &pac_display_buffer);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
auth/kerberos/gssapi_pac.c:265:4: warning: Value stored to 'gss_maj' is never read <--[clang]
gss_maj = gss_release_buffer_set(&gss_min, &set);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
auth/kerberos/gssapi_pac.c:273:4: warning: Value stored to 'gss_maj' is never read <--[clang]
gss_maj = gss_release_buffer_set(&gss_min, &set);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
auth/kerberos/gssapi_pac.c:279:4: warning: Value stored to 'gss_maj' is never read <--[clang]
gss_maj = gss_release_buffer_set(&gss_min, &set);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
auth/kerberos/gssapi_pac.c:285:5: warning: Value stored to 'gss_maj' is never read <--[clang]
gss_maj = gss_release_buffer_set(&gss_min, &set);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
auth/kerberos/gssapi_pac.c:291:2: warning: Value stored to 'gss_maj' is never read <--[clang]
gss_maj = gss_release_buffer_set(&gss_min, &set);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7 warnings generated.
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>
Autobuild-User(master): Noel Power <npower at samba.org>
Autobuild-Date(master): Mon Jul 8 11:04:15 UTC 2019 on sn-devel-184
commit d54f9aaf81e03d6a7d0e270a88c744f51af507f7
Author: Noel Power <noel.power at suse.com>
Date: Thu Jul 4 11:50:29 2019 +0000
s4/dsdb/schema: clang: Fix Array access results in null pointer deref
Fixes:
source4/dsdb/schema/schema_query.c:223:15: warning: Array access (from variable 'attr_list') results in a null pointer dereference <--[clang]
attr_list[i] = NULL;
~~~~~~~~~ ^
1 warning generated.
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>
commit 50a22849ce11aebead43e39ea42541afdd987408
Author: Noel Power <noel.power at suse.com>
Date: Wed Jul 3 14:56:55 2019 +0000
s4/dsdb/schema: Fix 'Value stored to 'ret' is never read'
Fixes:
source4/dsdb/schema/schema_set.c:274:3: warning: Value stored to 'ret' is never read <--[clang]
ret = LDB_SUCCESS;
^ ~~~~~~~~~~~
source4/dsdb/schema/schema_set.c:327:3: warning: Value stored to 'ret' is never read <--[clang]
ret = LDB_SUCCESS;
^ ~~~~~~~~~~~
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>
commit 109b438181563ed0074780df59a77bcdd7793e9d
Author: Noel Power <noel.power at suse.com>
Date: Wed Jul 3 12:51:01 2019 +0000
s4/dsdb/schema: Fix Access to field results in deference of null pointer
Fixes:
source4/dsdb/schema/schema_info_attr.c:207:38: warning: Access to field 'revision' results in a dereference of a null pointer (loaded from variable 'schema_info') <--[clang]
if (schema->schema_info->revision > schema_info->revision) {
^~~~~~~~~~~
1 warning generated.
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>
commit 96e00a525876ba13250c6428c014d58464fcf5f3
Author: Noel Power <noel.power at suse.com>
Date: Wed Jul 3 12:45:56 2019 +0000
s3/lib: Fix Access to field results in dereference of NULL pointer
Fixes:
ource3/lib/messages_dgm.c:176:29: warning: Access to field 'queue' results in a dereference of a null pointer (loaded from variable 'out') <--[clang]
qlen = tevent_queue_length(out->queue);
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>
commit 17ce70d6d9cb40afc38e41af3f0fd9ed052fb8a2
Author: Noel Power <noel.power at suse.com>
Date: Wed Jul 3 11:34:19 2019 +0000
lib/param: clang: Fix Value stored is never read
Fixes:
lib/param/loadparm.c:2164:2: warning: Value stored to 'bRetval' is never read <--[clang]
bRetval = false;
^ ~~~~~
1 warning generated.
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>
commit d759f4aa4b8e660e0745cfed30eb291d9484291d
Author: Noel Power <noel.power at suse.com>
Date: Wed Jul 3 11:10:44 2019 +0000
lib/util: clang: Fix 'Null pointer passed as an argument'
Fixes lib/util/iov_buf.c:50:4: warning: Null pointer passed as an argument to a 'nonnull' parameter <--[clang]
memcpy(p, iov[i].iov_base, thislen);
^
1 warning generated.
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Gary Lockyer <gary at catalyst.net.nz>
-----------------------------------------------------------------------
Summary of changes:
auth/kerberos/gssapi_pac.c | 14 +++++++-------
lib/param/loadparm.c | 10 +++++-----
lib/util/iov_buf.c | 2 +-
source3/lib/messages_dgm.c | 7 +++++++
source4/dsdb/schema/schema_info_attr.c | 9 +++++++++
source4/dsdb/schema/schema_query.c | 4 +++-
source4/dsdb/schema/schema_set.c | 2 --
7 files changed, 32 insertions(+), 16 deletions(-)
Changeset truncated at 500 lines:
diff --git a/auth/kerberos/gssapi_pac.c b/auth/kerberos/gssapi_pac.c
index e4dad18738b..12043992308 100644
--- a/auth/kerberos/gssapi_pac.c
+++ b/auth/kerberos/gssapi_pac.c
@@ -133,8 +133,8 @@ NTSTATUS gssapi_obtain_pac_blob(TALLOC_CTX *mem_ctx,
status = NT_STATUS_OK;
}
- gss_maj = gss_release_buffer(&gss_min, &pac_buffer);
- gss_maj = gss_release_buffer(&gss_min, &pac_display_buffer);
+ gss_release_buffer(&gss_min, &pac_buffer);
+ gss_release_buffer(&gss_min, &pac_display_buffer);
return status;
} else {
DEBUG(0, ("obtaining PAC via GSSAPI failed: authenticated: %s, complete: %s, more: %s\n",
@@ -262,7 +262,7 @@ NTSTATUS gssapi_get_session_key(TALLOC_CTX *mem_ctx,
krb5_free_keyblock(NULL /* should be krb5_context */, subkey);
}
#endif
- gss_maj = gss_release_buffer_set(&gss_min, &set);
+ gss_release_buffer_set(&gss_min, &set);
return NT_STATUS_OK;
@@ -270,25 +270,25 @@ NTSTATUS gssapi_get_session_key(TALLOC_CTX *mem_ctx,
gse_sesskeytype_oid.elements,
gse_sesskeytype_oid.length) != 0) {
/* Perhaps a non-krb5 session key */
- gss_maj = gss_release_buffer_set(&gss_min, &set);
+ gss_release_buffer_set(&gss_min, &set);
return NT_STATUS_OK;
}
p = (const uint8_t *)set->elements[1].value + gse_sesskeytype_oid.length;
diflen = set->elements[1].length - gse_sesskeytype_oid.length;
if (diflen <= 0) {
- gss_maj = gss_release_buffer_set(&gss_min, &set);
+ gss_release_buffer_set(&gss_min, &set);
return NT_STATUS_INVALID_PARAMETER;
}
for (i = 0; i < diflen; i++) {
*keytype = (*keytype << 7) | (p[i] & 0x7f);
if (i + 1 != diflen && (p[i] & 0x80) == 0) {
- gss_maj = gss_release_buffer_set(&gss_min, &set);
+ gss_release_buffer_set(&gss_min, &set);
return NT_STATUS_INVALID_PARAMETER;
}
}
}
- gss_maj = gss_release_buffer_set(&gss_min, &set);
+ gss_release_buffer_set(&gss_min, &set);
return NT_STATUS_OK;
}
diff --git a/lib/param/loadparm.c b/lib/param/loadparm.c
index 239d671803f..26b61789b3f 100644
--- a/lib/param/loadparm.c
+++ b/lib/param/loadparm.c
@@ -2161,15 +2161,14 @@ static bool do_section(const char *pszSectionName, void *userdata)
isglobal = ((strwicmp(pszSectionName, GLOBAL_NAME) == 0) ||
(strwicmp(pszSectionName, GLOBAL_NAME2) == 0));
- bRetval = false;
-
/* if we've just struck a global section, note the fact. */
lp_ctx->bInGlobalSection = isglobal;
/* check for multiple global sections */
if (lp_ctx->bInGlobalSection) {
DEBUG(4, ("Processing section \"[%s]\"\n", pszSectionName));
- return true;
+ bRetval = true;
+ goto out;
}
/* if we have a current service, tidy it up before moving on */
@@ -2188,10 +2187,11 @@ static bool do_section(const char *pszSectionName, void *userdata)
pszSectionName))
== NULL) {
DEBUG(0, ("Failed to add a new service\n"));
- return false;
+ bRetval = false;
+ goto out;
}
}
-
+out:
return bRetval;
}
diff --git a/lib/util/iov_buf.c b/lib/util/iov_buf.c
index 132c7a75637..a9224164068 100644
--- a/lib/util/iov_buf.c
+++ b/lib/util/iov_buf.c
@@ -46,7 +46,7 @@ ssize_t iov_buf(const struct iovec *iov, int iovcnt,
}
needed = tmp;
- if (needed <= buflen && thislen > 0) {
+ if ((p != NULL) && needed <= buflen && thislen > 0) {
memcpy(p, iov[i].iov_base, thislen);
p += thislen;
}
diff --git a/source3/lib/messages_dgm.c b/source3/lib/messages_dgm.c
index 60a12e2008f..11cb6969e73 100644
--- a/source3/lib/messages_dgm.c
+++ b/source3/lib/messages_dgm.c
@@ -323,6 +323,13 @@ static int messaging_dgm_out_get(struct messaging_dgm_context *ctx, pid_t pid,
}
messaging_dgm_out_rearm_idle_timer(out);
+ /*
+ * shouldn't be possible, should be set if messaging_dgm_out_create
+ * succeeded. This check is to satisfy static checker
+ */
+ if (out == NULL) {
+ return EINVAL;
+ }
*pout = out;
return 0;
diff --git a/source4/dsdb/schema/schema_info_attr.c b/source4/dsdb/schema/schema_info_attr.c
index dd06f9b2fbc..447bc9fd8fc 100644
--- a/source4/dsdb/schema/schema_info_attr.c
+++ b/source4/dsdb/schema/schema_info_attr.c
@@ -204,6 +204,15 @@ WERROR dsdb_schema_info_cmp(const struct dsdb_schema *schema,
return werr;
}
+ /*
+ * shouldn't really be possible is dsdb_schema_info_from_blob
+ * succeeded, this check is just to satisfy static checker
+ */
+ if (schema_info == NULL) {
+ TALLOC_FREE(frame);
+ return WERR_INVALID_PARAMETER;
+ }
+
if (schema->schema_info->revision > schema_info->revision) {
/*
* It's ok if our schema is newer than the remote one
diff --git a/source4/dsdb/schema/schema_query.c b/source4/dsdb/schema/schema_query.c
index 8a582161721..848f6cbd5b1 100644
--- a/source4/dsdb/schema/schema_query.c
+++ b/source4/dsdb/schema/schema_query.c
@@ -220,7 +220,9 @@ WERROR dsdb_linked_attribute_lDAPDisplayName_list(const struct dsdb_schema *sche
attr_list[i] = cur->lDAPDisplayName;
i++;
}
- attr_list[i] = NULL;
+ if (attr_list != NULL && attr_list[i] != NULL) {
+ attr_list[i] = NULL;
+ }
*attr_list_ret = attr_list;
return WERR_OK;
}
diff --git a/source4/dsdb/schema/schema_set.c b/source4/dsdb/schema/schema_set.c
index 258cbb81f25..b316686fd03 100644
--- a/source4/dsdb/schema/schema_set.c
+++ b/source4/dsdb/schema/schema_set.c
@@ -271,7 +271,6 @@ int dsdb_schema_set_indices_and_attributes(struct ldb_context *ldb,
}
ret = ldb_add(ldb, msg);
} else {
- ret = LDB_SUCCESS;
/* Annoyingly added to our search results */
ldb_msg_remove_attr(res->msgs[0], "distinguishedName");
@@ -324,7 +323,6 @@ int dsdb_schema_set_indices_and_attributes(struct ldb_context *ldb,
}
ret = ldb_add(ldb, msg_idx);
} else {
- ret = LDB_SUCCESS;
/* Annoyingly added to our search results */
ldb_msg_remove_attr(res_idx->msgs[0], "distinguishedName");
--
Samba Shared Repository
More information about the samba-cvs
mailing list