e2fsprogs/e2fsprogs-1.41.4-debugfs-stat-segfault.patch
Eric Sandeen dcd60901c8 * Thu Jan 29 2009 Eric Sandeen <sandeen@redhat.com> 1.41.4-2
- Fix debugfs "stat" segfault if no open fs (#482894)
- Fix name of libext2fs info page (#481620)
2009-01-29 22:43:47 +00:00

24 lines
892 B
Diff

Index: e2fsprogs/debugfs/debugfs.c
===================================================================
--- e2fsprogs.orig/debugfs/debugfs.c 2008-09-12 10:37:52.000000000 -0500
+++ e2fsprogs/debugfs/debugfs.c 2009-01-29 16:36:04.748574864 -0600
@@ -291,9 +291,6 @@ void do_show_super_stats(int argc, char
int c, header_only = 0;
int numdirs = 0, first, gdt_csum;
- gdt_csum = EXT2_HAS_RO_COMPAT_FEATURE(current_fs->super,
- EXT4_FEATURE_RO_COMPAT_GDT_CSUM);
-
reset_getopt();
while ((c = getopt (argc, argv, "h")) != EOF) {
switch (c) {
@@ -321,6 +318,8 @@ void do_show_super_stats(int argc, char
return;
}
+ gdt_csum = EXT2_HAS_RO_COMPAT_FEATURE(current_fs->super,
+ EXT4_FEATURE_RO_COMPAT_GDT_CSUM);
gdp = &current_fs->group_desc[0];
for (i = 0; i < current_fs->group_desc_count; i++, gdp++) {
fprintf(out, " Group %2d: block bitmap at %u, "