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

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