freebsd-nq/sbin/fsck_ffs
Kirk McKusick 12487c7243 Fix a read past the end of a buffer in fsck.
To minimize the time spent scanning all of the directories in pass 2
(Check Pathnames), fsck uses a search order based on the location
of their first block. Zero length directories have no first block,
so the array being used to hold the block numbers of directory
inodes was of zero length. Thus a lookup was done past the end of
the array getting at best a random value and at worst a segment
fault.  For zero length directories, this change allocates a one
element block array and initializes it to zero. The effect is that
all zero length directories are handled first in pass 2.

Reviewed by: brooks
Differential Revision: https://reviews.freebsd.org/D14163
2018-02-21 20:32:23 +00:00
..
dir.c
ea.c
fsck_ffs.8
fsck.h Include files missed in 329051. 2018-02-08 23:14:24 +00:00
fsutil.c Refactoring of reading and writing of the UFS/FFS superblock. 2018-01-26 00:58:32 +00:00
gjournal.c More throughly integrate libufs into fsck_ffs by using its cgput() 2018-01-24 23:57:40 +00:00
globs.c Include files missed in 329051. 2018-02-08 23:14:24 +00:00
inode.c Fix a read past the end of a buffer in fsck. 2018-02-21 20:32:23 +00:00
main.c Include files missed in 329051. 2018-02-08 23:14:24 +00:00
Makefile
Makefile.depend
pass1.c Rename cgget => cglookup to clear name space for new libufs function cgget. 2018-01-17 06:31:21 +00:00
pass1b.c
pass2.c
pass3.c
pass4.c
pass5.c The goal of this change is to prevent accidental foot shooting by 2018-02-08 23:06:58 +00:00
setup.c Refactoring of reading and writing of the UFS/FFS superblock. 2018-01-26 00:58:32 +00:00
suj.c Use sbput(3) rather than sbwrite(3) to ensure that the updated copy of 2018-02-02 00:07:38 +00:00
utilities.c