commit | 64777391eb2bdc0d57319bb9895b840a4c60e475 | [log] [tgz] |
---|---|---|
author | Theodore Ts'o <tytso@mit.edu> | Thu May 05 17:21:46 2005 -0400 |
committer | Theodore Ts'o <tytso@mit.edu> | Thu May 05 17:21:46 2005 -0400 |
tree | 15a2a6b9f928baf1c9252ed7433ae962ac3a89d5 | |
parent | 8139367bbde5f56a3febbdaa9205796a88310847 [diff] [blame] |
debugfs.c (do_stat): Check to make sure a filesystem is open and abort if with an error if not, to prevent a seg fault in that case.
diff --git a/debugfs/debugfs.c b/debugfs/debugfs.c index ca73c99..e923403 100644 --- a/debugfs/debugfs.c +++ b/debugfs/debugfs.c
@@ -595,6 +595,9 @@ ext2_ino_t inode; struct ext2_inode * inode_buf; + if (check_fs_open(argv[0])) + return 1; + inode_buf = (struct ext2_inode *) malloc(EXT2_INODE_SIZE(current_fs->super)); if (!inode_buf) {