[SCM] Samba Shared Repository - branch master updated
Noel Power
npower at samba.org
Wed Sep 9 12:11:02 UTC 2026
The branch, master has been updated
via fb5a5c024b9 pidl: fix CID(s) CID 1700846 -> CID 1700854 (and pre-existing)
via 82c287e5bfb s3/rpc_server/wsp: CID 1700845 Null pointer dereferences
via cbc6607a9f5 s3/rpc_server/wsp: CID 1700855: Null pointer dereferences
via b5684cf402f s3/rpc_server/wsp: Fix 'may be used uninitialized' err
from 1f6909cbb7a vfs_fruit: Allow renames for long filenames that don't have a ._ sidecar
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit fb5a5c024b96dd4d48f8405f5ff2d0e276fe8659
Author: Noel Power <noel.power at suse.com>
Date: Mon Sep 7 10:37:02 2026 +0100
pidl: fix CID(s) CID 1700846 -> CID 1700854 (and pre-existing)
pidl python generation FromUnionToPythonFunction generates code like
PyObject *ret;
switch (level) {
case SOME_LEVEL:
ret = (some conversion);
return ret;
case SOME_OTHER_LEVEL:
ret = (some other conversion);
return ret;
"" "" ""
"" "" ""
"" "" ""
default:
ret = (some conversion);
return ret;
}
[*] ==> PyErr_SetString(PyExc_TypeError, "unknown union level");
return NULL;
where [*] is unreachable
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Anoop C S <anoopcs at samba.org>
Autobuild-User(master): Noel Power <npower at samba.org>
Autobuild-Date(master): Wed Sep 9 12:10:35 UTC 2026 on atb-devel-224
commit 82c287e5bfb207784c88506d5cadc7a9e08e6c1d
Author: Noel Power <noel.power at suse.com>
Date: Mon Sep 7 09:42:37 2026 +0100
s3/rpc_server/wsp: CID 1700845 Null pointer dereferences
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Anoop C S <anoopcs at samba.org>
commit cbc6607a9f59a5ca358d0c810399389ca85e5744
Author: Noel Power <noel.power at suse.com>
Date: Mon Sep 7 09:37:25 2026 +0100
s3/rpc_server/wsp: CID 1700855: Null pointer dereferences
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Anoop C S <anoopcs at samba.org>
commit b5684cf402f498f03420a67bdabc456e0a28f7e1
Author: Noel Power <noel.power at suse.com>
Date: Mon Sep 7 09:12:59 2026 +0100
s3/rpc_server/wsp: Fix 'may be used uninitialized' err
../../source3/rpc_server/wsp/wsp_gss.c: In function ‘store_variant_array_to_buffer’:
../../source3/rpc_server/wsp/wsp_gss.c:1705:16: error: ‘err’ may be used uninitialized [-Werror=maybe-uninitialized]
1705 | return err;
| ^~~
../../source3/rpc_server/wsp/wsp_gss.c:1657:27: note: ‘err’ was declared here
1657 | enum ndr_err_code err;
| ^~~
cc1: all warnings being treated as errors
Signed-off-by: Noel Power <noel.power at suse.com>
Reviewed-by: Anoop C S <anoopcs at samba.org>
-----------------------------------------------------------------------
Summary of changes:
pidl/lib/Parse/Pidl/Samba4/Python.pm | 17 +++++++++++------
source3/rpc_server/wsp/wsp_es_abs_if.c | 21 +++++++++++++--------
source3/rpc_server/wsp/wsp_es_conv.c | 2 +-
source3/rpc_server/wsp/wsp_gss.c | 2 ++
4 files changed, 27 insertions(+), 15 deletions(-)
Changeset truncated at 500 lines:
diff --git a/pidl/lib/Parse/Pidl/Samba4/Python.pm b/pidl/lib/Parse/Pidl/Samba4/Python.pm
index 383181dc104..e4302a48e5b 100644
--- a/pidl/lib/Parse/Pidl/Samba4/Python.pm
+++ b/pidl/lib/Parse/Pidl/Samba4/Python.pm
@@ -92,6 +92,7 @@ sub EnumAndBitmapConsts($$$)
sub FromUnionToPythonFunction($$$$)
{
my ($self, $mem_ctx, $type, $switch, $name) = @_;
+ my $has_default = 0;
$self->pidl("PyObject *ret;");
$self->pidl("");
@@ -101,7 +102,7 @@ sub FromUnionToPythonFunction($$$$)
foreach my $e (@{$type->{ELEMENTS}}) {
$self->pidl("$e->{CASE}:");
-
+ if ($e->{CASE} eq "default") { $has_default = 1; }
$self->indent;
if ($e->{NAME}) {
@@ -110,18 +111,22 @@ sub FromUnionToPythonFunction($$$$)
$self->pidl("ret = Py_None;");
$self->pidl("Py_INCREF(ret);");
}
-
- $self->pidl("return ret;");
+ $self->pidl("break;");
+ $self->deindent;
$self->pidl("");
+ }
+ if (!$has_default) {
+ $self->pidl("default:");
+ $self->indent;
+ $self->pidl("PyErr_SetString(PyExc_TypeError, \"unknown union level\");");
+ $self->pidl("ret = NULL;");
$self->deindent;
}
$self->deindent;
$self->pidl("}");
-
- $self->pidl("PyErr_SetString(PyExc_TypeError, \"unknown union level\");");
- $self->pidl("return NULL;");
+ $self->pidl("return ret;");
}
sub FromPythonToUnionFunction($$$$$)
diff --git a/source3/rpc_server/wsp/wsp_es_abs_if.c b/source3/rpc_server/wsp/wsp_es_abs_if.c
index 42a8c17da34..350c64f3b0e 100644
--- a/source3/rpc_server/wsp/wsp_es_abs_if.c
+++ b/source3/rpc_server/wsp/wsp_es_abs_if.c
@@ -4154,14 +4154,19 @@ static struct tevent_req *wsp_es_release_cursor_send(
}
query_info = find_query_info(queryidentifier);
- binding = find_binding_data(query_info, cursorhandle);
-
- if (binding != NULL && query_info != NULL) {
- DLIST_REMOVE(query_info->bindings.items, binding);
- /* #FIXME freeing the binding should result in it's removal from the list */
- TALLOC_FREE(binding);
- query_info->bindings.nbindings--;
- remove_cursors_data(cursorhandle, query_info);
+
+ if (query_info != NULL) {
+ binding = find_binding_data(query_info, cursorhandle);
+ if (binding != NULL) {
+ DLIST_REMOVE(query_info->bindings.items, binding);
+ /*
+ * #FIXME freeing the binding should result in
+ * it's removal from the list
+ */
+ TALLOC_FREE(binding);
+ query_info->bindings.nbindings--;
+ remove_cursors_data(cursorhandle, query_info);
+ }
}
state->remaining_cursors = ncursors;
tevent_req_done(req);
diff --git a/source3/rpc_server/wsp/wsp_es_conv.c b/source3/rpc_server/wsp/wsp_es_conv.c
index 7c0d39c9ccd..77b5b461858 100644
--- a/source3/rpc_server/wsp/wsp_es_conv.c
+++ b/source3/rpc_server/wsp/wsp_es_conv.c
@@ -498,7 +498,7 @@ static HRESULT get_folderpath_from_url(TALLOC_CTX *ctx,
const char *url,
char **folderpath)
{
- struct es_row_data *row_data = data->row_data;
+ struct es_row_data *row_data = NULL;
char *result = NULL;
char *slash = NULL;
char *tmp = NULL;
diff --git a/source3/rpc_server/wsp/wsp_gss.c b/source3/rpc_server/wsp/wsp_gss.c
index 04573236107..62f837066b9 100644
--- a/source3/rpc_server/wsp/wsp_gss.c
+++ b/source3/rpc_server/wsp/wsp_gss.c
@@ -1,3 +1,4 @@
+
/*
* Unix SMB/CIFS implementation.
*
@@ -1680,6 +1681,7 @@ static enum ndr_err_code store_variant_array_to_buffer(TALLOC_CTX *ctx,
DBG_ERR("#FIXME Unhandled variant type %s\n",
get_vtype_name(values[i].vtype));
TALLOC_FREE(offsets);
+ err = NDR_ERR_BAD_SWITCH;
goto out;
}
--
Samba Shared Repository
More information about the samba-cvs
mailing list