mirror of
https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git
synced 2024-12-12 03:13:52 +08:00
debugfs: fix logdump on file systems with block sizes > 8192
Addresses-Coverity-Bug: 1472879 Addresses-Coverity-Bug: 1472880 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
This commit is contained in:
parent
462c424500
commit
28e22540e2
@ -350,7 +350,7 @@ static void dump_journal(char *cmdname, FILE *out_file,
|
||||
{
|
||||
struct ext2_super_block *sb;
|
||||
char jsb_buffer[1024];
|
||||
char buf[8192];
|
||||
char buf[EXT2_MAX_BLOCK_SIZE];
|
||||
journal_superblock_t *jsb;
|
||||
unsigned int blocksize = 1024;
|
||||
int retval;
|
||||
@ -409,7 +409,7 @@ static void dump_journal(char *cmdname, FILE *out_file,
|
||||
blocksize = be32_to_cpu(jsb->s_blocksize);
|
||||
if ((current_fs && (blocksize != current_fs->blocksize)) ||
|
||||
(!current_fs && (!blocksize || (blocksize & (blocksize - 1)) ||
|
||||
(blocksize > 65536)))) {
|
||||
(blocksize > EXT2_MAX_BLOCK_SIZE)))) {
|
||||
fprintf(out_file,
|
||||
"Journal block size invalid: %u (%u)\n",
|
||||
be32_to_cpu(jsb->s_blocksize), blocksize);
|
||||
|
Loading…
Reference in New Issue
Block a user