cluster: RHEL6 - gfs2_edit: fix a segfault with file names > 255 bytes

Bob Peterson rpeterso at fedoraproject.org
Wed Jul 24 15:56:06 UTC 2013


Gitweb:        http://git.fedorahosted.org/git/?p=cluster.git;a=commitdiff;h=d019d4a3697fa9d5e055d86e6b40f02a3f22cd60
Commit:        d019d4a3697fa9d5e055d86e6b40f02a3f22cd60
Parent:        aef6f49250ee8aa3c6792002f8d5bb81091abd76
Author:        Bob Peterson <rpeterso at redhat.com>
AuthorDate:    Fri Feb 1 21:28:46 2013 -0700
Committer:     Bob Peterson <rpeterso at redhat.com>
CommitterDate: Wed Jul 24 10:29:09 2013 -0500

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 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/gfs2/edit/gfs2hex.c b/gfs2/edit/gfs2hex.c
index 7962228..0aabcd9 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);


More information about the cluster-commits mailing list