[coreboot-gerrit] Patch set updated for coreboot: cbfstool/cbfs_image: Initialze empty_sz to 0

Furquan Shaikh (furquan@google.com) gerrit at coreboot.org
Fri Aug 5 20:58:02 CEST 2016


Furquan Shaikh (furquan at google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/16071

-gerrit

commit 39102ae74555ab25efa5c77da3b397e5b5d4da98
Author: Furquan Shaikh <furquan at google.com>
Date:   Fri Aug 5 08:12:31 2016 -0700

    cbfstool/cbfs_image: Initialze empty_sz to 0
    
    Change-Id: I8b9cfe56b5893ba11047fcc1a6727e7e12a15772
    Signed-off-by: Furquan Shaikh <furquan at google.com>
    Found-by: Coverity Scan # 1361276
---
 util/cbfstool/cbfs_image.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/util/cbfstool/cbfs_image.c b/util/cbfstool/cbfs_image.c
index 1e38e4e..9e63692 100644
--- a/util/cbfstool/cbfs_image.c
+++ b/util/cbfstool/cbfs_image.c
@@ -1049,7 +1049,6 @@ static int cbfs_payload_make_elf(struct buffer *buff, uint32_t arch)
 	struct cbfs_payload_segment *segs;
 	struct elf_writer *ew;
 	struct buffer elf_out;
-	size_t empty_sz;
 	int segments = 0;
 
 	if (arch == CBFS_ARCHITECTURE_UNKNOWN) {
@@ -1115,6 +1114,7 @@ static int cbfs_payload_make_elf(struct buffer *buff, uint32_t arch)
 
 	for (int i = 0; i < segments; i++) {
 		struct buffer tbuff;
+		size_t empty_sz = 0;
 
 		memset(&shdr, 0, sizeof(shdr));
 		char *name = NULL;



More information about the coreboot-gerrit mailing list