From d265e2ecc19cea9f3a3ed3acf7d8da852268e3c3 Mon Sep 17 00:00:00 2001 From: xuguangmin Date: Wed, 28 Jul 2021 16:00:06 +0800 Subject: [PATCH] fix regressions caused by safe_makepath change in libopenfcoe.c --- backport-04-fix-directory-path-is-truncated.patch | 11 +++++++++++ fcoe-utils.spec | 3 ++- 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 backport-04-fix-directory-path-is-truncated.patch diff --git a/backport-04-fix-directory-path-is-truncated.patch b/backport-04-fix-directory-path-is-truncated.patch new file mode 100644 index 0000000..b51b270 --- /dev/null +++ b/backport-04-fix-directory-path-is-truncated.patch @@ -0,0 +1,11 @@ +--- a/libopenfcoe.c.ori 2021-07-28 14:16:15.291321043 +0800 ++++ b/libopenfcoe.c 2021-07-28 14:16:26.339525321 +0800 +@@ -58,7 +58,7 @@ + static char *safe_makepath(char *path, size_t path_sz, + char *dname, char *fname) + { +- size_t dsz = sizeof(dname); ++ size_t dsz = strlen(dname); + size_t fsz = strlen(fname); + char *cp = path; + diff --git a/fcoe-utils.spec b/fcoe-utils.spec index d90e7b8..8f1e517 100644 --- a/fcoe-utils.spec +++ b/fcoe-utils.spec @@ -1,6 +1,6 @@ Name: fcoe-utils Version: 1.0.33 -Release: 1 +Release: 2 Summary: Fibre Channel over Ethernet utilities License: GPLv2 URL: https://github.com/morbidrsa/fcoe-utils @@ -12,6 +12,7 @@ Patch0: backport-00-Revert_Make_gcc_compiler_happy_about_ifname_stri Patch1: backport-01-fix_VLAN_device_name_overflow_check.patch Patch2: backport-02-string_op_truncation_format_trauncation.patch Patch3: backport-03-use-of-uninitialized-values-detected-during-LTO.patch +Patch4: backport-04-fix-directory-path-is-truncated.patch #This patch refer to ubuntu's version -- Gitee