lkml.org 
[lkml]   [2010]   [Jul]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 2/3] [fs/sysv] V7: Adjust sanity checks for some volumes
    >  	if (fs16_to_cpu(sbi, v7sb->s_nfree) > V7_NICFREE ||
    > fs16_to_cpu(sbi, v7sb->s_ninode) > V7_NICINOD ||
    > - fs32_to_cpu(sbi, v7sb->s_time) == 0)
    > - goto failed;
    > + fs32_to_cpu(sbi, v7sb->s_fsize) > V7_MAXSIZE)
    > + return 0;

    Ok.

    > v7i = (struct sysv_inode *)(bh2->b_data + 64);
    > if ((fs16_to_cpu(sbi, v7i->i_mode) & ~0777) != S_IFDIR ||
    > (fs32_to_cpu(sbi, v7i->i_size) == 0) ||
    > - (fs32_to_cpu(sbi, v7i->i_size) & 017) != 0)
    > + (fs32_to_cpu(sbi, v7i->i_size) & 017)
    > + (fs32_to_cpu(sbi, v7i->i_size) > V7_NFILES *
    > + sizeof (struct sysv_dir_entry))) {

    Maybe I'm missing something, but without and additional || on the
    first line you added this doesn't look like it will compile.



    \
     
     \ /
      Last update: 2010-07-19 16:57    [W:0.020 / U:0.248 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site