mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
ctdb-protocol: CID 1499395: Uninitialized variables (UNINIT)
Issue is reported here: 853 case CTDB_CONTROL_DB_VACUUM: { 854 struct ctdb_db_vacuum db_vacuum; 855 >>> CID 1499395: Uninitialized variables (UNINIT) >>> Using uninitialized value "db_vacuum.full_vacuum_run" when calling "ctdb_db_vacuum_len". 856 CHECK_CONTROL_DATA_SIZE(ctdb_db_vacuum_len(&db_vacuum)); 857 return ctdb_control_db_vacuum(ctdb, c, indata, async_reply); 858 } The problem is that ctdb_bool_len() unnecessarily dereferences its argument, which in this case is &db_vacuum.full_vacuum_run. Not a security issue because the value copied by dereferencing is not used. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com> Autobuild-User(master): Amitay Isaacs <amitay@samba.org> Autobuild-Date(master): Wed Feb 23 02:02:06 UTC 2022 on sn-devel-184
This commit is contained in:
parent
0f373443ef
commit
0d8084ed62
@ -162,7 +162,7 @@ int ctdb_double_pull(uint8_t *buf, size_t buflen, double *out, size_t *npull)
|
||||
|
||||
size_t ctdb_bool_len(bool *in)
|
||||
{
|
||||
uint8_t u8 = *in;
|
||||
uint8_t u8 = 0;
|
||||
|
||||
return ctdb_uint8_len(&u8);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user