X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=fs%2Fhpfs%2Fsuper.c;h=962e90c37aec64ec95773467f146951995c9adc1;hb=3ebacb05044f82c5f0bb456a894eb9dc57d0ed90;hp=a0617e7069579c61baed047b3ba2992b294d6082;hpb=241a9871263f3114717c0ed416a1bd1d2415d1fb;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git diff --git a/fs/hpfs/super.c b/fs/hpfs/super.c index a0617e7..962e90c 100644 --- a/fs/hpfs/super.c +++ b/fs/hpfs/super.c @@ -558,7 +558,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;