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

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