mirror of
https://github.com/SELinuxProject/selinux
synced 2024-12-28 08:52:05 +00:00
libsepol/cil: do not use an uninitialized value in __cil_fqn_qualify_blocks
In __cil_fqn_qualify_blocks(), when newlen >= CIL_MAX_NAME_LENGTH, cil_tree_log() is called with child_args.node as argument but this value has not been initialized yet. Use local variable node instead, which is initialized early enough in the function. This issue has been found using clang's static analyzer. Signed-off-by: Nicolas Iooss <nicolas.iooss@m4x.org>
This commit is contained in:
parent
9cc62ce35d
commit
4a0fab43cb
@ -121,7 +121,7 @@ static int __cil_fqn_qualify_blocks(__attribute__((unused)) hashtab_key_t k, has
|
||||
|
||||
exit:
|
||||
if (rc != SEPOL_OK) {
|
||||
cil_tree_log(child_args.node, CIL_ERR,"Problem qualifying names in block");
|
||||
cil_tree_log(node, CIL_ERR,"Problem qualifying names in block");
|
||||
}
|
||||
|
||||
return rc;
|
||||
|
Loading…
Reference in New Issue
Block a user