Date: Tue, 14 Mar 2000 23:18:17 -0800 (PST) From: Kirk McKusick <mckusick@FreeBSD.org> To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/ufs/ufs ufs_bmap.c ufs_lookup.c Message-ID: <200003150718.XAA79704@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
mckusick 2000/03/14 23:18:17 PST Modified files: sys/ufs/ufs ufs_bmap.c ufs_lookup.c Log: Bug fixes for currently harmless bugs that could rise to bite the unwary if the code were called in slightly different ways. 1) In ufs_bmaparray() the code for calculating 'runb' will stop one block short of the first entry in an indirect block. i.e. if an indirect block contains N block numbers b[0]..b[N-1] then the code will never check if b[0] and b[1] are sequential. For reference, compare with the equivalent code that deals with direct blocks. 2) In ufs_lookup() there is an off-by-one error in the test that checks if dp->i_diroff is outside the range of the the current directory size. This is completely harmless, since the following while-loop condition 'dp->i_offset < endsearch' is never met, so the code immediately does a second pass starting at dp->i_offset = 0. 3) Again in ufs_lookup(), the condition in a sanity check is wrong for directories that are longer than one block. This bug means that the sanity check is only effective for small directories. Submitted by: Ian Dowse <iedowse@maths.tcd.ie> Revision Changes Path 1.35 +2 -2 src/sys/ufs/ufs/ufs_bmap.c 1.34 +4 -4 src/sys/ufs/ufs/ufs_lookup.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200003150718.XAA79704>