X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=fs%2Fhpfs%2Fsuper.c;h=f760c15f0bf5218a882b14da28542e6b4d9841f1;hb=60cbc8c9108be5542b8b7b9e16231fdee062f6d9;hp=98580a3b5005feea514e961476d9a0686c912979;hpb=655402d41742cc8e490f4357745408d361bdd2d4;p=kernel%2Flinux-3.0.git diff --git a/fs/hpfs/super.c b/fs/hpfs/super.c index 98580a3..f760c15 100644 --- a/fs/hpfs/super.c +++ b/fs/hpfs/super.c @@ -553,7 +553,13 @@ static int hpfs_fill_super(struct super_block *s, void *options, int silent) sbi->sb_cp_table = NULL; sbi->sb_c_bitmap = -1; sbi->sb_max_fwd_alloc = 0xffffff; - + + if (sbi->sb_fs_size >= 0x80000000) { + hpfs_error(s, "invalid size in superblock: %08x", + (unsigned)sbi->sb_fs_size); + goto bail4; + } + /* Load bitmap directory */ if (!(sbi->sb_bmp_dir = hpfs_load_bitmap_directory(s, le32_to_cpu(superblock->bitmaps)))) goto bail4;