Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Tanya Agarwal and committed by
Paul Moore
714d87c9 f09ff307

+1 -1
+1 -1
security/lockdown/lockdown.c
··· 96 96 static ssize_t lockdown_read(struct file *filp, char __user *buf, size_t count, 97 97 loff_t *ppos) 98 98 { 99 - char temp[80]; 99 + char temp[80] = ""; 100 100 int i, offset = 0; 101 101 102 102 for (i = 0; i < ARRAY_SIZE(lockdown_levels); i++) {