Blame SOURCES/0004-fix-regressions-caused-by-safe_makepath-change-in-li.patch

bf9e84
From 108387a2aa986a8107faa7548f3f9e9c084749d2 Mon Sep 17 00:00:00 2001
bf9e84
From: Chris Leech <cleech@redhat.com>
bf9e84
Date: Wed, 24 Mar 2021 09:50:51 -0700
bf9e84
Subject: [PATCH 4/5] fix regressions caused by safe_makepath change in
bf9e84
 libopenfcoe.c
bf9e84
bf9e84
This needs to use strlen(dname) not sizeof(dname) or the directory path
bf9e84
is truncated.  On a 64-bit arch an 8 byte truncation kind of looks like
bf9e84
a valid path '/sys/bus' which is sort of funny unless you're debugging
bf9e84
it.
bf9e84
bf9e84
This caused fcoeadm --fcf to fail to read in FCF info, and fcoeadm
bf9e84
--lesb to fail to find the link error status block counters.
bf9e84
bf9e84
Signed-off-by: Chris Leech <cleech@redhat.com>
bf9e84
---
bf9e84
 libopenfcoe.c | 2 +-
bf9e84
 1 file changed, 1 insertion(+), 1 deletion(-)
bf9e84
bf9e84
diff --git a/libopenfcoe.c b/libopenfcoe.c
bf9e84
index 452ee803e63..cd35c868eee 100644
bf9e84
--- a/libopenfcoe.c
bf9e84
+++ b/libopenfcoe.c
bf9e84
@@ -58,7 +58,7 @@ out_err:
bf9e84
 static char *safe_makepath(char *path, size_t path_sz,
bf9e84
 		char *dname, char *fname)
bf9e84
 {
bf9e84
-	size_t dsz = sizeof(dname);
bf9e84
+	size_t dsz = strlen(dname);
bf9e84
 	size_t fsz = strlen(fname);
bf9e84
 	char *cp = path;
bf9e84
 
bf9e84
-- 
bf9e84
2.26.2
bf9e84