diff options
author | takeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp> | 2020-11-02 11:07:33 +0900 |
---|---|---|
committer | takeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp> | 2020-11-02 11:07:33 +0900 |
commit | 1c7d6584a7811b7785ae5c1e378f14b5ba0971cf (patch) | |
tree | cd70a267a5ef105ba32f200aa088e281fbd85747 /external/poky/meta/recipes-devtools/mmc/mmc-utils | |
parent | 4204309872da5cb401cbb2729d9e2d4869a87f42 (diff) |
basesystem-jjsandbox/ToshikazuOhiwa/master-jj
recipes
Diffstat (limited to 'external/poky/meta/recipes-devtools/mmc/mmc-utils')
2 files changed, 32 insertions, 36 deletions
diff --git a/external/poky/meta/recipes-devtools/mmc/mmc-utils/0001-lsmmc-replace-strncpy-with-memmove-on-overlapping-me.patch b/external/poky/meta/recipes-devtools/mmc/mmc-utils/0001-lsmmc-replace-strncpy-with-memmove-on-overlapping-me.patch deleted file mode 100644 index 62e25fde..00000000 --- a/external/poky/meta/recipes-devtools/mmc/mmc-utils/0001-lsmmc-replace-strncpy-with-memmove-on-overlapping-me.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 175ac0f362bf6121c3537e2f1760ad41c8f81367 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Thu, 29 Mar 2018 01:04:57 -0700 -Subject: [PATCH] lsmmc: replace strncpy with memmove on overlapping memory - copy - -here source and destination addresses are overlapping so using memmove is -going to be more efficient. - -Additionally, the bounded size for copy is overflowing for first copy - -In function 'strncpy', - inlined from 'read_file' at lsmmc.c:356:3: -/mnt/a/oe/build/tmp/work/cortexa7t2hf-neon-vfpv4-bec-linux-gnueabi/mmc-utils/0.1-r0/recipe-sysroot/usr/include/bits/string_fortified.h:106:10: error: '__builtin_strncpy' accessing 4096 bytes at offsets 0 and 1 overlaps 4095 bytes at offset 1 [-Werror=restrict] - return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest)); - ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- -Upstream-Status: Submitted [https://patchwork.kernel.org/patch/10314723/] - lsmmc.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/lsmmc.c b/lsmmc.c -index c4faa00..bcb854d 100644 ---- a/lsmmc.c -+++ b/lsmmc.c -@@ -353,7 +353,7 @@ char *read_file(char *name) - line[strlen(line) - 1] = '\0'; - - while (isspace(line[0])) -- strncpy(&line[0], &line[1], sizeof(line)); -+ memmove(&line[0], &line[1], sizeof(line)-1); - - return strdup(line); - } diff --git a/external/poky/meta/recipes-devtools/mmc/mmc-utils/0001-mmc_cmd.c-Use-extra-braces-when-initializing-subobje.patch b/external/poky/meta/recipes-devtools/mmc/mmc-utils/0001-mmc_cmd.c-Use-extra-braces-when-initializing-subobje.patch new file mode 100644 index 00000000..12707357 --- /dev/null +++ b/external/poky/meta/recipes-devtools/mmc/mmc-utils/0001-mmc_cmd.c-Use-extra-braces-when-initializing-subobje.patch @@ -0,0 +1,32 @@ +From 04fbe6ddb5f1e02efbcae3cdf5beb16757a98948 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 10 May 2019 12:58:01 -0700 +Subject: [PATCH] mmc_cmd.c: Use extra braces when initializing subobjects + +clang warns with -Werror,-Wmissing-braces, as following error +| mmc_cmds.c:1886:36: error: suggest braces around initialization of subobject [-Werror,-W +missing-braces] +| struct rpmb_frame frame_status = {0}; +| ^ +| {} + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + mmc_cmds.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/mmc_cmds.c b/mmc_cmds.c +index 19a9da1..838e8c3 100644 +--- a/mmc_cmds.c ++++ b/mmc_cmds.c +@@ -1883,7 +1883,7 @@ static int do_rpmb_op(int fd, + u_int16_t rpmb_type; + struct mmc_ioc_multi_cmd *mioc; + struct mmc_ioc_cmd *ioc; +- struct rpmb_frame frame_status = {0}; ++ struct rpmb_frame frame_status = {{0}}; + + if (!frame_in || !frame_out || !out_cnt) + return -EINVAL; |