lkml.org 
[lkml]   [2010]   [Jul]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/3] [fs/sysv] V7: Adjust sanity checks for some volumes
From
Date
On Mon, 2010-07-19 at 16:54 +0200, Christoph Hellwig wrote:

> > 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.

You're right. In fact this hunk is fixed in a commit that followed it, I
probably incorrectly merged the fixups in git (the latter commit also
had an useless comment change and such).

I'll follow up with a fixed commit tomorrow, since I'm unable to test it
now.

Thanks,
Lubo

--
Flash is the Web2.0 version of blink and animated gifs.
-- Stephen Smoogen



\
 
 \ /
  Last update: 2010-07-20 12:35    [W:0.095 / U:1.708 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site