summaryrefslogtreecommitdiffstats
path: root/sys/fs/cd9660/cd9660_vnops.c
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2008-06-11 12:46:09 +0000
committerkib <kib@FreeBSD.org>2008-06-11 12:46:09 +0000
commitbe4c9e4b3b6be5549c8326f90be430c7db363910 (patch)
treefd6c9eefaa45a05e50889580a8b4733277c44ef7 /sys/fs/cd9660/cd9660_vnops.c
parent622e89669b90845bcd0c26719d54b19eb1c37583 (diff)
downloadFreeBSD-src-be4c9e4b3b6be5549c8326f90be430c7db363910.zip
FreeBSD-src-be4c9e4b3b6be5549c8326f90be430c7db363910.tar.gz
In cd9660_readdir vop, always initialize the idp->uio_off member.
The while loop that is assumed to initialize the uio_off later, may be not entered at all, causing uninitialized value to be returned in uio->uio_offset. PR: 122925 Submitted by: Jaakko Heinonen <jh saunalahti fi> MFC after: 1 weeks
Diffstat (limited to 'sys/fs/cd9660/cd9660_vnops.c')
-rw-r--r--sys/fs/cd9660/cd9660_vnops.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/fs/cd9660/cd9660_vnops.c b/sys/fs/cd9660/cd9660_vnops.c
index ab6fea8..fad364f 100644
--- a/sys/fs/cd9660/cd9660_vnops.c
+++ b/sys/fs/cd9660/cd9660_vnops.c
@@ -495,6 +495,7 @@ cd9660_readdir(ap)
}
idp->eofflag = 1;
idp->curroff = uio->uio_offset;
+ idp->uio_off = uio->uio_offset;
if ((entryoffsetinblock = idp->curroff & bmask) &&
(error = cd9660_blkatoff(vdp, (off_t)idp->curroff, NULL, &bp))) {
OpenPOWER on IntegriCloud