From c9a94477f2b1b8521c2038b0666e262d1bcc53a5 Mon Sep 17 00:00:00 2001 From: Salvatore Bonaccorso Date: Fri, 6 Mar 2020 10:06:30 +0100 Subject: [PATCH] Drop "tools/lib/api/fs/fs.c: Fix misuse of strncpy()" --- debian/changelog | 1 + ...ib-api-fs-fs.c-fix-misuse-of-strncpy.patch | 41 ------------------- debian/patches/series | 1 - 3 files changed, 1 insertion(+), 42 deletions(-) delete mode 100644 debian/patches/bugfix/all/tools-lib-api-fs-fs.c-fix-misuse-of-strncpy.patch diff --git a/debian/changelog b/debian/changelog index 1f3fa6f68..d118c48a1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1049,6 +1049,7 @@ linux (4.19.106-1) UNRELEASED; urgency=medium local_irq_save()" for context changes in 4.19.104. * [rt] Refresh "arm64: fpsimd: use preemp_disable in addition to local_bh_disable()" for context changes in 4.19.105. + * Drop "tools/lib/api/fs/fs.c: Fix misuse of strncpy()" [ Ben Hutchings ] * [x86] Drop "Add a SysRq option to lift kernel lockdown" (Closes: #947021) diff --git a/debian/patches/bugfix/all/tools-lib-api-fs-fs.c-fix-misuse-of-strncpy.patch b/debian/patches/bugfix/all/tools-lib-api-fs-fs.c-fix-misuse-of-strncpy.patch deleted file mode 100644 index 6a11704ce..000000000 --- a/debian/patches/bugfix/all/tools-lib-api-fs-fs.c-fix-misuse-of-strncpy.patch +++ /dev/null @@ -1,41 +0,0 @@ -From: Ben Hutchings -Date: Thu, 19 Jul 2018 23:36:52 +0100 -Subject: tools/lib/api/fs/fs.c: Fix misuse of strncpy() -Bug-Debian: https://bugs.debian.org/897802 -Forwarded: https://lore.kernel.org/lkml/20180721021026.GQ14131@decadent.org.uk/T/ - -gcc 8 reports: - -In function 'fs__env_override', - inlined from 'fs__get_mountpoint' at fs/fs.c:228:6: -fs/fs.c:222:2: error: 'strncpy' specified bound 4096 equals destination size [-Werror=stringop-truncation] - strncpy(fs->path, override_path, sizeof(fs->path)); - ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -I'm not convinced it makes sense to truncate the copied string here, -but since we're already doing so let's ensure it's still null- -terminated. Use strlcpy() instead. - -Signed-off-by: Ben Hutchings ---- -Index: linux/tools/lib/api/fs/fs.c -=================================================================== ---- linux.orig/tools/lib/api/fs/fs.c -+++ linux/tools/lib/api/fs/fs.c -@@ -12,6 +12,7 @@ - #include - #include - #include -+#include - - #include "fs.h" - #include "debug-internal.h" -@@ -219,7 +220,7 @@ static bool fs__env_override(struct fs * - return false; - - fs->found = true; -- strncpy(fs->path, override_path, sizeof(fs->path)); -+ strlcpy(fs->path, override_path, sizeof(fs->path)); - return true; - } - diff --git a/debian/patches/series b/debian/patches/series index 0e5166c93..3cb1bcd64 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -166,7 +166,6 @@ bugfix/all/tools-build-remove-bpf-run-time-check-at-build-time.patch bugfix/all/cpupower-bump-soname-version.patch bugfix/all/libcpupower-hide-private-function.patch bugfix/all/cpupower-fix-checks-for-cpu-existence.patch -bugfix/all/tools-lib-api-fs-fs.c-fix-misuse-of-strncpy.patch bugfix/all/usbip-fix-misuse-of-strncpy.patch bugfix/x86/tools-turbostat-Add-checks-for-failure-of-fgets-and-.patch bugfix/all/libbpf-add-soname-to-shared-object.patch