1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-06 13:18:07 +03:00
samba-mirror/source3/registry
Andreas Schneider 8c4f807350 s3:registry: Avoid possible double frees
Found by Covscan.

"Error: USE_AFTER_FREE (CWE-416):
samba-4.20.0rc2/source3/registry/reg_perfcount.c:309: freed_arg: ""_reg_perfcount_multi_sz_from_tdb"" frees ""*retbuf"".
samba-4.20.0rc2/source3/registry/reg_perfcount.c:313: double_free: Calling ""_reg_perfcount_multi_sz_from_tdb"" frees pointer ""*retbuf"" which has already been freed.
  311|   	for(i = 1; i <= base_index; i++)
  312|   	{
  313|-> 		buffer_size = _reg_perfcount_multi_sz_from_tdb(names, i*2, retbuf, buffer_size);
  314|   	}
  315|   	tdb_close(names);"

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
2024-06-24 06:14:36 +00:00
..
tests
reg_api_util.c registry3: Move registry_value_cmp() to its only user 2022-09-19 17:23:31 +00:00
reg_api_util.h registry3: Move registry_value_cmp() to its only user 2022-09-19 17:23:31 +00:00
reg_api.c libcli/security: Rename dup_nt_token() -> security_token_duplicate() 2023-09-26 23:45:36 +00:00
reg_api.h
reg_backend_current_version.c
reg_backend_db.c s3:registry: Fix code spelling 2023-07-19 09:58:37 +00:00
reg_backend_db.h
reg_backend_hkpt_params.c
reg_backend_netlogon_params.c
reg_backend_perflib.c
reg_backend_printing.c
reg_backend_prod_options.c CVE-2020-25717: Add FreeIPA domain controller role 2021-11-09 19:45:33 +00:00
reg_backend_shares.c
reg_backend_smbconf.c
reg_backend_tcpip_params.c
reg_cachehook.c
reg_cachehook.h
reg_db.h
reg_dispatcher.c
reg_dispatcher.h
reg_format.c s3:registry: Add missing newlines to logging messages 2023-08-08 04:39:38 +00:00
reg_format.h s3:registry: Fix code spelling 2023-07-19 09:58:37 +00:00
reg_import.c
reg_import.h s3:registry: Fix code spelling 2023-07-19 09:58:37 +00:00
reg_init_basic.c
reg_init_basic.h
reg_init_full.c
reg_init_full.h
reg_init_smbconf.c
reg_init_smbconf.h
reg_objects.c registry3: Align function types to what is returned 2022-07-25 12:04:33 +00:00
reg_objects.h registry3: Align function types to what is returned 2022-07-25 12:04:33 +00:00
reg_parse_dox.cfg s3:registry: Fix code spelling 2023-07-19 09:58:37 +00:00
reg_parse_internal.c s3:registry Renaming get_charset() to smbreg_get_charset() 2021-02-10 21:00:28 +00:00
reg_parse_internal.h s3:registry: Fix code spelling 2023-08-14 04:57:34 +00:00
reg_parse_prs.c s3:registry: Fix code spelling 2023-09-11 02:42:41 +00:00
reg_parse_prs.h
reg_parse.c s3:registry: Add missing newlines to logging messages 2023-08-08 04:39:38 +00:00
reg_parse.h s3:registry: Fix code spelling 2023-07-19 09:58:37 +00:00
reg_perfcount.c s3:registry: Avoid possible double frees 2024-06-24 06:14:36 +00:00
reg_perfcount.h
reg_util_internal.c
reg_util_internal.h
reg_util_token.c
reg_util_token.h
regfio.c s3:registry: Fix code spelling 2023-07-19 09:58:37 +00:00
regfio.h s3:registry: Fix code spelling 2023-07-19 09:58:37 +00:00