Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1503053

[PATCH 4/8] efi/efi_test: Fix the uninitialized value datasize

From Matt Fleming <matt@codeblueprint.co.uk>
Newsgroups linux.kernel
Subject [PATCH 4/8] efi/efi_test: Fix the uninitialized value datasize
Date 2016-10-18 16:40 +0200
Message-ID <stDID-2X6-65@gated-at.bofh.it> (permalink)
References <stDIC-2X6-35@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Ivan Hu <ivan.hu@canonical.com>

Fix the minor issue found by CoverityScan
CID 1358931 (#1 of 1): Uninitialized scalar variable (UNINIT)9.
uninit_use: Using uninitialized value datasize.
199        prev_datasize = datasize;
200        status = efi.get_variable(name, vd, at, dz, data);

Signed-off-by: Ivan Hu <ivan.hu@canonical.com>
Cc: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk>
---
 drivers/firmware/efi/test/efi_test.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/firmware/efi/test/efi_test.c b/drivers/firmware/efi/test/efi_test.c
index ae51268737cc..348efc9cf59f 100644
--- a/drivers/firmware/efi/test/efi_test.c
+++ b/drivers/firmware/efi/test/efi_test.c
@@ -155,7 +155,7 @@ static long efi_runtime_get_variable(unsigned long arg)
 {
 	struct efi_getvariable __user *getvariable_user;
 	struct efi_getvariable getvariable;
-	unsigned long datasize, prev_datasize, *dz;
+	unsigned long datasize = 0, prev_datasize, *dz;
 	efi_guid_t vendor_guid, *vd = NULL;
 	efi_status_t status;
 	efi_char16_t *name = NULL;
-- 
2.10.0

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[GIT PULL 0/8] EFI changes for v4.10 Matt Fleming <matt@codeblueprint.co.uk> - 2016-10-18 16:40 +0200
  [PATCH 1/8] MAINTAINERS: add myself as EFI maintainer Matt Fleming <matt@codeblueprint.co.uk> - 2016-10-18 16:40 +0200
    [tip:efi/core] MAINTAINERS: Add myself as EFI maintainer tip-bot for Ard Biesheuvel <tipbot@zytor.com> - 2016-10-18 17:40 +0200
  [PATCH 3/8] efi/arm*: efi_init() error handling fix Matt Fleming <matt@codeblueprint.co.uk> - 2016-10-18 16:40 +0200
    [tip:efi/core] efi/arm*: Fix efi_init() error handling tip-bot for Yisheng Xie <tipbot@zytor.com> - 2016-10-18 17:40 +0200
  [PATCH 2/8] efi: Remove unused including <linux/version.h> Matt Fleming <matt@codeblueprint.co.uk> - 2016-10-18 16:40 +0200
    [tip:efi/core] efi: Remove unused include of <linux/version.h> tip-bot for Wei Yongjun <tipbot@zytor.com> - 2016-10-18 17:40 +0200
  [PATCH 4/8] efi/efi_test: Fix the uninitialized value datasize Matt Fleming <matt@codeblueprint.co.uk> - 2016-10-18 16:40 +0200
    [tip:efi/core] efi/efi_test: Fix uninitialized variable 'datasize' tip-bot for Ivan Hu <tipbot@zytor.com> - 2016-10-18 17:40 +0200
  [PATCH 5/8] efi/efi_test: Fix the uninitialized value rv Matt Fleming <matt@codeblueprint.co.uk> - 2016-10-18 16:40 +0200
    [tip:efi/core] efi/efi_test: Fix uninitialized variable 'rv' tip-bot for Ivan Hu <tipbot@zytor.com> - 2016-10-18 17:40 +0200
  [PATCH 6/8] efi/efi_test: Use memdup_user() as a cleanup Matt Fleming <matt@codeblueprint.co.uk> - 2016-10-18 16:40 +0200
    [tip:efi/core] efi/efi_test: Use memdup_user() as a cleanup tip-bot for Ivan Hu <tipbot@zytor.com> - 2016-10-18 17:40 +0200
  [PATCH 8/8] efi: efivar_ssdt_load: Don't return success on allocation failure Matt Fleming <matt@codeblueprint.co.uk> - 2016-10-18 16:40 +0200
    [tip:efi/core] efi/efivar_ssdt_load: Don't return success on  allocation failure tip-bot for Dan Carpenter <tipbot@zytor.com> - 2016-10-18 17:40 +0200
  Re: [GIT PULL 0/8] EFI changes for v4.10 Ard Biesheuvel <ard.biesheuvel@linaro.org> - 2016-10-18 17:30 +0200
  Re: [GIT PULL 0/8] EFI changes for v4.10 Ingo Molnar <mingo@kernel.org> - 2016-10-18 17:30 +0200
  Re: [GIT PULL 0/8] EFI changes for v4.10 Lukas Wunner <lukas@wunner.de> - 2016-10-18 17:40 +0200
    Re: [GIT PULL 0/8] EFI changes for v4.10 Matt Fleming <matt@codeblueprint.co.uk> - 2016-10-18 17:50 +0200

csiph-web