On 20 Oct 2014, at 15:38, Maxime Villard <[email protected]> wrote: > Probably with the conviction I would find some bugs I opened ffs/ffs_vfsops.c > and something immediately stroke me:
<snip> > Index: ffs_vfsops.c > =================================================================== > RCS file: /cvsroot/src/sys/ufs/ffs/ffs_vfsops.c,v > retrieving revision 1.299 > diff -u -r1.299 ffs_vfsops.c > --- ffs_vfsops.c 24 May 2014 16:34:04 -0000 1.299 > +++ ffs_vfsops.c 20 Oct 2014 13:01:46 -0000 > @@ -974,7 +974,7 @@ > continue; > > /* Validate size of superblock */ > - if (sbsize > MAXBSIZE || sbsize < sizeof(struct fs)) > + if (sbsize > SBLOCKSIZE || sbsize < sizeof(struct fs)) > continue; > > /* Check that we can handle the file system blocksize */ > > Tested on NetBSD-current: no longer crashes. > > Ok/Comments? Looks ok. -- J. Hannken-Illjes - [email protected] - TU Braunschweig (Germany)
