System V stdio bug fix

gwyn at brl-vld gwyn at brl-vld
Thu Aug 25 12:11:15 AEST 1983


From:      Doug Gwyn (VLD/VMB) <gwyn at brl-vld>

The new, nifty stdio still has the same bug in findiop.c:
The lines reading
	for(iop = _iob; iop->_flag & (_IOREAD | _IOWRT | _IORW); iop++)
		if(iop >= _lastbuf)
should be changed to read
	for(iop = _iob; iop->_flag & (_IOREAD | _IOWRT | _IORW); )
		if(++iop >= _lastbuf)
in order to avoid a "boundary condition" bug.



More information about the Comp.unix.wizards mailing list