cvs commit: src/lib/libc/gen readdir.c telldir.c telldir.h

[ Available lists | Index of cvs-all | Month of May 2008 | Week of 19 May 2008 | Raw email | View thread | Wrap long lines | Reply | Tag ]
From
Konstantin Belousov <kib@FreeBSD.org>
Date
19 May 2008 11:43:36
Subject
cvs commit: src/lib/libc/gen readdir.c telldir.c telldir.h
Message-ID
200805191143.m4JBha59052776@repoman.freebsd.org


[ Hide this part ]
kib         2008-05-19 11:43:36 UTC

FreeBSD src repository

Modified files: (Branch: RELENG_7)
lib/libc/gen readdir.c telldir.c telldir.h
Log:
MFC
rev. 1.15 of lib/libc/gen/readdir.c
rev. 1.11 of lib/libc/gen/telldir.c
rev. 1.3 of lib/libc/gen/telldir.h

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

Revision Changes Path
1.13.2.1 +7 -6 src/lib/libc/gen/readdir.c
1.9.2.1 +1 -1 src/lib/libc/gen/telldir.c
1.2.24.1 +2 -2 src/lib/libc/gen/telldir.h


Elapsed time: 0.065 seconds