diff options
author | Konstantin Belousov <kib@FreeBSD.org> | 2008-06-11 12:46:09 +0000 |
---|---|---|
committer | Konstantin Belousov <kib@FreeBSD.org> | 2008-06-11 12:46:09 +0000 |
commit | ac8b6edd89cd7030fa1e2d751c609910004482a7 (patch) | |
tree | fd6c9eefaa45a05e50889580a8b4733277c44ef7 /sys/fs/cd9660 | |
parent | 81b910389d0101df741652dac2189a9b07cc2c33 (diff) | |
download | src-ac8b6edd89cd7030fa1e2d751c609910004482a7.tar.gz src-ac8b6edd89cd7030fa1e2d751c609910004482a7.zip |
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
Notes
Notes:
svn path=/head/; revision=179722
Diffstat (limited to 'sys/fs/cd9660')
-rw-r--r-- | sys/fs/cd9660/cd9660_vnops.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/fs/cd9660/cd9660_vnops.c b/sys/fs/cd9660/cd9660_vnops.c index ab6fea8f092e..fad364f0db1b 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))) { |