diff options
2 files changed, 44 insertions, 2 deletions
diff --git a/meta-signing-key/recipes-devtools/sbsigntool/sbsigntool/0001-fileio.c-initialize-local-variables-before-use-in-fu.patch b/meta-signing-key/recipes-devtools/sbsigntool/sbsigntool/0001-fileio.c-initialize-local-variables-before-use-in-fu.patch new file mode 100644 index 0000000..634225a --- /dev/null +++ b/meta-signing-key/recipes-devtools/sbsigntool/sbsigntool/0001-fileio.c-initialize-local-variables-before-use-in-fu.patch | |||
@@ -0,0 +1,43 @@ | |||
1 | From 8a2dfef2fbb68d72ee8b5a542cfb22817050ebdb Mon Sep 17 00:00:00 2001 | ||
2 | From: Yi Zhao <yi.zhao@windriver.com> | ||
3 | Date: Tue, 22 Jun 2021 11:20:17 +0800 | ||
4 | Subject: [PATCH] fileio.c: initialize local variables before use in function | ||
5 | __fileio_read_file | ||
6 | MIME-Version: 1.0 | ||
7 | Content-Type: text/plain; charset=UTF-8 | ||
8 | Content-Transfer-Encoding: 8bit | ||
9 | |||
10 | Fixes: | ||
11 | fileio.c: In function ‘__fileio_read_file’: | ||
12 | fileio.c:179:26: error: ‘len’ may be used uninitialized in this function [-Werror=maybe-uninitialized] | ||
13 | 179 | *out_len = len; | ||
14 | | ~~~~~~~~~^~~~~ | ||
15 | fileio.c:178:26: error: ‘buf’ may be used uninitialized in this function [-Werror=maybe-uninitialized] | ||
16 | 178 | *out_buf = buf; | ||
17 | | ~~~~~~~~~^~~~~ | ||
18 | |||
19 | Upstream-Status: Pending | ||
20 | |||
21 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | ||
22 | --- | ||
23 | src/fileio.c | 4 ++-- | ||
24 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
25 | |||
26 | diff --git a/src/fileio.c b/src/fileio.c | ||
27 | index 032eb1e..929bb00 100644 | ||
28 | --- a/src/fileio.c | ||
29 | +++ b/src/fileio.c | ||
30 | @@ -142,8 +142,8 @@ static int __fileio_read_file(void *ctx, const char *filename, | ||
31 | uint8_t **out_buf, size_t *out_len, int flags) | ||
32 | { | ||
33 | struct stat statbuf; | ||
34 | - uint8_t *buf; | ||
35 | - size_t len; | ||
36 | + uint8_t *buf = NULL; | ||
37 | + size_t len = 0; | ||
38 | int fd, rc; | ||
39 | |||
40 | rc = -1; | ||
41 | -- | ||
42 | 2.17.1 | ||
43 | |||
diff --git a/meta-signing-key/recipes-devtools/sbsigntool/sbsigntool_git.bb b/meta-signing-key/recipes-devtools/sbsigntool/sbsigntool_git.bb index c38fa42..b742e08 100644 --- a/meta-signing-key/recipes-devtools/sbsigntool/sbsigntool_git.bb +++ b/meta-signing-key/recipes-devtools/sbsigntool/sbsigntool_git.bb | |||
@@ -17,6 +17,7 @@ SRC_URI = " \ | |||
17 | file://0002-docs-Don-t-build-man-pages.patch \ | 17 | file://0002-docs-Don-t-build-man-pages.patch \ |
18 | file://0003-sbsign-add-x-option-to-avoid-overwrite-existing-sign.patch \ | 18 | file://0003-sbsign-add-x-option-to-avoid-overwrite-existing-sign.patch \ |
19 | file://0001-src-Makefile.am-Add-read_write_all.c-to-common_SOURC.patch \ | 19 | file://0001-src-Makefile.am-Add-read_write_all.c-to-common_SOURC.patch \ |
20 | file://0001-fileio.c-initialize-local-variables-before-use-in-fu.patch \ | ||
20 | " | 21 | " |
21 | SRCREV_sbsigntools ?= "f12484869c9590682ac3253d583bf59b890bb826" | 22 | SRCREV_sbsigntools ?= "f12484869c9590682ac3253d583bf59b890bb826" |
22 | SRCREV_ccan ?= "b1f28e17227f2320d07fe052a8a48942fe17caa5" | 23 | SRCREV_ccan ?= "b1f28e17227f2320d07fe052a8a48942fe17caa5" |
@@ -42,8 +43,6 @@ def efi_arch(d): | |||
42 | # --with-libtool-sysroot \ | 43 | # --with-libtool-sysroot \ |
43 | #" | 44 | #" |
44 | 45 | ||
45 | CFLAGS += "-Wno-error=maybe-uninitialized" | ||
46 | |||
47 | HOST_EXTRACFLAGS += "\ | 46 | HOST_EXTRACFLAGS += "\ |
48 | INCLUDES+='-I${S}/lib/ccan.git/ \ | 47 | INCLUDES+='-I${S}/lib/ccan.git/ \ |
49 | -I${STAGING_INCDIR_NATIVE}/efi \ | 48 | -I${STAGING_INCDIR_NATIVE}/efi \ |