* [ptxdist] [PATCH] mmc-utils: version bump 2016-06-07 -> 2018-03-27
@ 2018-12-06 15:47 Lucas Stach
0 siblings, 0 replies; only message in thread
From: Lucas Stach @ 2018-12-06 15:47 UTC (permalink / raw)
To: ptxdist
- version bump
- picked patch from linux-mmc ML to fix compilation with GCC 8
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
...ce-strncpy-with-memmove-on-overlapping-me.patch | 34 ++++++++++++++++++++++
patches/mmc-utils-2018-03-27-gb4fe0c8c0e57/series | 4 +++
rules/mmc-utils.make | 4 +--
3 files changed, 40 insertions(+), 2 deletions(-)
create mode 100644 patches/mmc-utils-2018-03-27-gb4fe0c8c0e57/0001-lsmmc-replace-strncpy-with-memmove-on-overlapping-me.patch
create mode 100644 patches/mmc-utils-2018-03-27-gb4fe0c8c0e57/series
diff --git a/patches/mmc-utils-2018-03-27-gb4fe0c8c0e57/0001-lsmmc-replace-strncpy-with-memmove-on-overlapping-me.patch b/patches/mmc-utils-2018-03-27-gb4fe0c8c0e57/0001-lsmmc-replace-strncpy-with-memmove-on-overlapping-me.patch
new file mode 100644
index 000000000000..858493d277c4
--- /dev/null
+++ b/patches/mmc-utils-2018-03-27-gb4fe0c8c0e57/0001-lsmmc-replace-strncpy-with-memmove-on-overlapping-me.patch
@@ -0,0 +1,34 @@
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 29 Mar 2018 01:19:14 -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>
+---
+ lsmmc.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lsmmc.c b/lsmmc.c
+index c4faa002e780..bcb854daf3e1 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/patches/mmc-utils-2018-03-27-gb4fe0c8c0e57/series b/patches/mmc-utils-2018-03-27-gb4fe0c8c0e57/series
new file mode 100644
index 000000000000..6018eff4c070
--- /dev/null
+++ b/patches/mmc-utils-2018-03-27-gb4fe0c8c0e57/series
@@ -0,0 +1,4 @@
+# generated by git-ptx-patches
+#tag:base --start-number 1
+0001-lsmmc-replace-strncpy-with-memmove-on-overlapping-me.patch
+# eb541e33133cca3f061e8631e6c490ca - git-ptx-patches magic
diff --git a/rules/mmc-utils.make b/rules/mmc-utils.make
index 3a3317bcb9b8..1eee457b7f62 100644
--- a/rules/mmc-utils.make
+++ b/rules/mmc-utils.make
@@ -17,8 +17,8 @@ PACKAGES-$(PTXCONF_MMC_UTILS) += mmc-utils
# Paths and names
#
# No tags: use a fake descriptive commit-ish to include the date
-MMC_UTILS_VERSION := 2016-06-07-g0ca049f25191
-MMC_UTILS_MD5 := da395e908be7e11bd8417cc02485be31
+MMC_UTILS_VERSION := 2018-03-27-gb4fe0c8c0e57
+MMC_UTILS_MD5 := 1018cdca94530054cc11e4bcb97d4b11
MMC_UTILS := mmc-utils-$(MMC_UTILS_VERSION)
MMC_UTILS_SUFFIX := tar.gz
MMC_UTILS_URL := git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc-utils.git;tag=$(MMC_UTILS_VERSION)
--
2.11.0
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-12-06 15:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-06 15:47 [ptxdist] [PATCH] mmc-utils: version bump 2016-06-07 -> 2018-03-27 Lucas Stach
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox