Date: Mon, 5 May 2008 14:05:23 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/lib/libc/gen readdir.c telldir.c telldir.h Message-ID: <200805051405.m45E5NGN082245@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
kib 2008-05-05 14:05:23 UTC
FreeBSD src repository
Modified files:
lib/libc/gen readdir.c telldir.c telldir.h
Log:
Do not read away the target directory entry when encountering deleted
files after a seekdir().
The seekdir shall set the position for the next readdir operation.
When the _readdir_unlocked() encounters deleted entry, dd_loc is
already advanced. Continuing the loop leads to premature read of
the target entry.
Submitted by: Marc Balmer <mbalmer at openbsd org>
Obtained from: OpenBSD
MFC after: 2 weeks
Revision Changes Path
1.15 +7 -6 src/lib/libc/gen/readdir.c
1.11 +1 -1 src/lib/libc/gen/telldir.c
1.3 +2 -2 src/lib/libc/gen/telldir.h
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200805051405.m45E5NGN082245>
