mirror of https://github.com/torvalds/linux.git
lockdown: initialize local array before use to quiet static analysis
The static code analysis tool "Coverity Scan" pointed the following
details out for further development considerations:
CID 1486102: Uninitialized scalar variable (UNINIT)
uninit_use_in_call: Using uninitialized value *temp when calling
strlen.
Signed-off-by: Tanya Agarwal <tanyaagarwal25699@gmail.com>
[PM: edit/reformat the description, subject line]
Signed-off-by: Paul Moore <paul@paul-moore.com>
This commit is contained in:
parent
f09ff307c7
commit
714d87c90a
|
|
@ -96,7 +96,7 @@ static int __init lockdown_lsm_init(void)
|
||||||
static ssize_t lockdown_read(struct file *filp, char __user *buf, size_t count,
|
static ssize_t lockdown_read(struct file *filp, char __user *buf, size_t count,
|
||||||
loff_t *ppos)
|
loff_t *ppos)
|
||||||
{
|
{
|
||||||
char temp[80];
|
char temp[80] = "";
|
||||||
int i, offset = 0;
|
int i, offset = 0;
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_SIZE(lockdown_levels); i++) {
|
for (i = 0; i < ARRAY_SIZE(lockdown_levels); i++) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue