Skip to content

Commit 714d87c

Browse files
TanyaAgarwal25pcmoore
authored andcommitted
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 <[email protected]> [PM: edit/reformat the description, subject line] Signed-off-by: Paul Moore <[email protected]>
1 parent f09ff30 commit 714d87c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

security/lockdown/lockdown.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ static int __init lockdown_lsm_init(void)
9696
static ssize_t lockdown_read(struct file *filp, char __user *buf, size_t count,
9797
loff_t *ppos)
9898
{
99-
char temp[80];
99+
char temp[80] = "";
100100
int i, offset = 0;
101101

102102
for (i = 0; i < ARRAY_SIZE(lockdown_levels); i++) {

0 commit comments

Comments
 (0)