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
This commit is contained in:
Konstantin Belousov 2008-06-11 12:46:09 +00:00
parent 81b910389d
commit ac8b6edd89

View file

@ -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))) {