From be4c9e4b3b6be5549c8326f90be430c7db363910 Mon Sep 17 00:00:00 2001 From: kib Date: Wed, 11 Jun 2008 12:46:09 +0000 Subject: 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 MFC after: 1 weeks --- sys/fs/cd9660/cd9660_vnops.c | 1 + 1 file changed, 1 insertion(+) (limited to 'sys') 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))) { -- cgit v1.1