www.delorie.com/archives/browse.cgi | search |
On Wed, Mar 15, 2000 at 01:13:03AM -0500, J. David Bryan wrote: >On 15 Mar 2000, at 0:58, Chris Faylor wrote: > >> Ok. I've got it. Sorry. I obviously lost the thread pretty badly. >> >> (slinks away) > >Must be a late night! ;-) They all are... >As I noted, the proper solution is to fix the invalid buffer call, but one >can work around the problem either by defining WIN32 and accepting the >tradeoffs (slow reads, no $HOME support) or by undefining O_BINARY and >accepting the tradeoff (no \r\n support). This sounds correct to me. Passing what is essentially a bogus argument for the buffer length is just wrong. At the very least, it's subject to problems if the file size changes while you're reading it. Admittedly this is an unusual occurrence but why not program for something like this and fail gracefully rather than core dumping? cgf -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |