From: Christoph Hellwig <hch@lst.de>
To: Lubomir Rintel <lkundrak@v3.sk>
Cc: Christoph Hellwig <hch@lst.de>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH 2/3] [fs/sysv] V7: Adjust sanity checks for some volumes
Date: Mon, 19 Jul 2010 16:54:57 +0200 [thread overview]
Message-ID: <20100719145457.GC25279@lst.de> (raw)
In-Reply-To: <1279559802-19154-3-git-send-email-lkundrak@v3.sk>
> 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.
next prev parent reply other threads:[~2010-07-19 14:55 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-19 17:16 A few V7 fs improvements Lubomir Rintel
2010-07-19 14:53 ` Christoph Hellwig
2010-07-19 16:10 ` Bill Davidsen
2010-07-19 17:16 ` [PATCH 1/3] [fs/sysv] Add v7 alias Lubomir Rintel
2010-07-19 14:53 ` Christoph Hellwig
2010-07-19 17:16 ` [PATCH 2/3] [fs/sysv] V7: Adjust sanity checks for some volumes Lubomir Rintel
2010-07-19 14:54 ` Christoph Hellwig [this message]
2010-07-20 10:31 ` Lubomir Rintel
2010-07-22 1:11 ` [PATCH] " Lubomir Rintel
2010-07-19 17:16 ` [PATCH 3/3] [fs/sysv] V7: Add support for non-PDP11 v7 filesystems Lubomir Rintel
2010-07-19 14:58 ` Christoph Hellwig
2010-07-20 10:41 ` Lubomir Rintel
2010-07-22 1:17 ` Lubomir Rintel
2010-07-22 1:18 ` [PATCH] " Lubomir Rintel
2010-07-24 13:51 ` [PATCH 3/3] [fs/sysv] " Al Viro
2010-07-25 22:59 ` [PATCH] " Lubomir Rintel
2010-07-26 0:26 ` Randy Dunlap
2010-07-26 23:52 ` Andrew Morton
2010-07-27 0:19 ` Lubomir Rintel
2010-07-27 0:29 ` Andrew Morton
2010-07-25 5:23 ` A few V7 fs improvements Artem Bityutskiy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100719145457.GC25279@lst.de \
--to=hch@lst.de \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkundrak@v3.sk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox