This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
Re: B20: large fread() calls fail
- To: "Nathan Strong" <gblues@jps.net>
- Subject: Re: B20: large fread() calls fail
- From: "Kenneth D. Weinert" <kweinert@earthlink.net>
- Date: Mon, 9 Aug 1999 04:27:17 -0600
- CC: <cygwin@sourceware.cygnus.com>
- Organization: Quarterflash Design Group
- References: <000501bee1fd$f645d620$5001010a@gblues>
- Reply-To: "Kenneth D. Weinert" <kweinert@mindspring.com>
Hello Nathan,
Chances are it is the difference between text and binary mode:
The EOL character gets expanded into CRLF when you read, so more
characters are read than the stat() is telling you. It sometimes works
because of the way memory is allocated and whether or not you
overwrite something important when you overflow the buffer.
Also I would note that you have a couple of places you can
lose a bunch of memory - those places you return after allocating
memory but are unable to fill it.
Best regards,
Ken mailto:kweinert@earthlink.net
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com