diff options
| author | Tanya Agarwal <[email protected]> | 2025-01-05 07:05:38 +0000 |
|---|---|---|
| committer | Paul Moore <[email protected]> | 2025-01-05 17:48:43 +0000 |
| commit | 714d87c90a766e6917f7d69f618b864d350f09d3 (patch) | |
| tree | 9d994ec8391cdd3ba38ef559d5f1b54a2f3b1ceb | |
| parent | safesetid: check size of policy writes (diff) | |
| download | kernel-714d87c90a766e6917f7d69f618b864d350f09d3.tar.gz kernel-714d87c90a766e6917f7d69f618b864d350f09d3.zip | |
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]>
| -rw-r--r-- | security/lockdown/lockdown.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/security/lockdown/lockdown.c b/security/lockdown/lockdown.c index f2bdbd55aa2b..cf83afa1d879 100644 --- a/security/lockdown/lockdown.c +++ b/security/lockdown/lockdown.c @@ -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, loff_t *ppos) { - char temp[80]; + char temp[80] = ""; int i, offset = 0; for (i = 0; i < ARRAY_SIZE(lockdown_levels); i++) { |
