summaryrefslogtreecommitdiff
path: root/gnu/dist/diffutils/src/diff.c
diff options
context:
space:
mode:
authoryamt <yamt@NetBSD.org>2006-01-14 09:09:02 +0000
committeryamt <yamt@NetBSD.org>2006-01-14 09:09:02 +0000
commit3a6eed1f586722007c9331b99b0a1ae622bf529f (patch)
tree6bf0354a2015e064f7c8517e944dfaa469710ea5 /gnu/dist/diffutils/src/diff.c
parentcabee93abbb1f3e3c829667717cfb8422f249e7d (diff)
pull freebsd's ufs_lookup.c rev.1.53 and 1.54. PR/31873.
> ---------------------------- > revision 1.54 > date: 2001/08/26 01:25:12; author: iedowse; state: Exp; lines: +30 -12 > When compacting directories, ufs_direnter() always trusted DIRSIZ() > to supply the number of bytes to be bcopy()'d to move an entry. If > d_ino == 0 however, DIRSIZ() is not guaranteed to return a sensible > length, so ufs_direnter could end up corrupting a directory during > compaction. In practice I believe this can only happen after fsck_ffs > has fixed a previously-corrupted directory. > > We now deal with any mid-block unused entries specially to avoid > using DIRSIZ() or bcopy() on such entries. We also ensure that the > variables 'dsize' and 'spacefree' contain meaningful values at all > times. Add a few comments to describe better this intricate piece > of code. > > The special handling of mid-block unused entries makes the dirhash- > specific bugfix in the previous revision (1.53) now uncecessary, > so this change removes it. > > Reviewed by: mckusick > ---------------------------- > revision 1.53 > date: 2001/08/22 01:35:17; author: iedowse; state: Exp; lines: +2 -2 > When compressing directory blocks, the dirhash code didn't check > that the directory entry was in use before attempting to find it > in the hash structures to change its offset. Normally, unused > entries do not need to be moved, but fsck can leave behind some > unused entries that do. A dirhash sanity panic resulted when the > entry to be moved was not found. Add a check that stops entries > with d_ino == 0 from being passed to ufsdirhash_move().
Diffstat (limited to 'gnu/dist/diffutils/src/diff.c')
0 files changed, 0 insertions, 0 deletions