[Ocfs2-tools-devel] [PATCH 2/3] debugfs.ocfs2: Fix walking off the end of the volume label.
Joel Becker
joel.becker at oracle.com
Wed Sep 10 16:30:22 PDT 2008
ocfs2 volume labels are not terminated, so handle that.
Signed-off-by: Joel Becker <joel.becker at oracle.com>
---
debugfs.ocfs2/dump.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/debugfs.ocfs2/dump.c b/debugfs.ocfs2/dump.c
index b8e0aba..678a7fa 100644
--- a/debugfs.ocfs2/dump.c
+++ b/debugfs.ocfs2/dump.c
@@ -88,7 +88,7 @@ void dump_super_block(FILE *out, struct ocfs2_super_block *sb)
fprintf(out, "\tMax Node Slots: %u\n", sb->s_max_slots);
- fprintf(out, "\tLabel: %s\n", sb->s_label);
+ fprintf(out, "\tLabel: %.*s\n", OCFS2_MAX_VOL_LABEL_LEN, sb->s_label);
fprintf(out, "\tUUID: ");
for (i = 0; i < 16; i++)
fprintf(out, "%02X", sb->s_uuid[i]);
--
1.5.6.3
More information about the Ocfs2-tools-devel
mailing list