[SCM] Samba Shared Repository - branch master updated
Martin Schwenke
martins at samba.org
Sun Oct 6 02:26:02 UTC 2024
The branch, master has been updated
via e819d55c4c8 utils: Fix up 14a533680245
via 79b05108ec0 lib: Use talloc_realloc instead of talloc_realloc_size
from c75b08c0d64 s3:g_lock: Do not let pointers to point outside the input buffer
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit e819d55c4c8a7412f40c5d1deda16dcf80ea5e59
Author: Volker Lendecke <vl at samba.org>
Date: Fri Oct 4 15:12:22 2024 +0200
utils: Fix up 14a533680245
Obvious omission
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Martin Schwenke <martin at meltin.net>
Autobuild-User(master): Martin Schwenke <martins at samba.org>
Autobuild-Date(master): Sun Oct 6 02:25:09 UTC 2024 on atb-devel-224
commit 79b05108ec0167314ad85835e734dc29aeeb1058
Author: Volker Lendecke <vl at samba.org>
Date: Fri Oct 4 15:09:35 2024 +0200
lib: Use talloc_realloc instead of talloc_realloc_size
Maybe Coverity understands that talloc_realloc re-allocates the input
buf. It does not understand that talloc_realloc_size does it.
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Martin Schwenke <martin at meltin.net>
-----------------------------------------------------------------------
Summary of changes:
lib/util/util_paths.c | 2 +-
source3/utils/net_rpc_shell.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
Changeset truncated at 500 lines:
diff --git a/lib/util/util_paths.c b/lib/util/util_paths.c
index b35cc7f5863..1685c3c3cbf 100644
--- a/lib/util/util_paths.c
+++ b/lib/util/util_paths.c
@@ -95,7 +95,7 @@ static char *get_user_home_dir(TALLOC_CTX *mem_ctx)
goto done;
}
len = newlen;
- tmp = talloc_realloc_size(mem_ctx, buf, len);
+ tmp = talloc_realloc(mem_ctx, buf, char, len);
if (tmp == NULL) {
goto done;
}
diff --git a/source3/utils/net_rpc_shell.c b/source3/utils/net_rpc_shell.c
index 5b1285086f8..4e872d8b58b 100644
--- a/source3/utils/net_rpc_shell.c
+++ b/source3/utils/net_rpc_shell.c
@@ -58,8 +58,8 @@ static char **completion_fn(const char *text, int start, int end)
bool match = (strncmp(text, c->name, strlen(text)) == 0);
if (match) {
- ADD_TO_ARRAY(NULL, char *, SMB_STRDUP(c->name),
- &cmds, &n_cmds);
+ ADD_TO_MALLOC_ARRAY(char *, SMB_STRDUP(c->name),
+ &cmds, &n_cmds);
}
}
--
Samba Shared Repository
More information about the samba-cvs
mailing list