tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

seekdir/telldir bug + fix


I have developed a fix for the seekdir/telldir bug which Marc Balmer
discovered recently. I tested it to work on both NetBSD-4.0 and
-current, and it seems to work well and not break anything.

The bug is that if the first entry of a block is deleted, telldir and
seekdir may shoot one entry too far. The patch is of course not to skip
deleted entries when being called from telldir.

I made some adaptions because people told me that this function is
exported and thus 3.0 compatibility would be an issue. I am not sure if
anyone _should_ use it, but since people asked...

I still have to test the compat changes I made though.

Please find the patch under:

A program to reproduce the bug can be found under:

Usage: ./readdir-no-skip-deleted 28 2 0

Ok to commit? Or are there modifications which I should make?


Attachment: signature.asc
Description: PGP signature

Home | Main Index | Thread Index | Old Index