[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] [gfs2-utils PATCH 3/3] gfs2_edit: fix a segfault with file names > 255 bytes



This patch fixes a segfault in gfs2_edit caused by trying to print
file names longer than 255 bytes.
---
 gfs2/edit/gfs2hex.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gfs2/edit/gfs2hex.c b/gfs2/edit/gfs2hex.c
index 6979cd9..cc0ceb6 100644
--- a/gfs2/edit/gfs2hex.c
+++ b/gfs2/edit/gfs2hex.c
@@ -122,7 +122,7 @@ void eol(int col) /* end of line */
 void __attribute__((format (printf, 1, 2))) print_gfs2(const char *fmt, ...)
 {
 	va_list args;
-	char string[NAME_MAX];
+	char string[PATH_MAX];
 	
 	memset(string, 0, sizeof(string));
 	va_start(args, fmt);
-- 
1.8.3.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]