Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm List-Unsubscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@sourceware.cygnus.com Delivered-To: mailing list cygwin@sourceware.cygnus.com Date: Mon, 9 Aug 1999 04:27:17 -0600 From: "Kenneth D. Weinert" X-Mailer: The Bat! (v1.34a) UNREG / CD5BF9353B3B7091 Reply-To: "Kenneth D. Weinert" Organization: Quarterflash Design Group X-Priority: 3 (Normal) Message-ID: <9185.990809@mindspring.com> To: "Nathan Strong" CC: Subject: Re: B20: large fread() calls fail In-reply-To: <000501bee1fd$f645d620$5001010a@gblues> References: <000501bee1fd$f645d620$5001010a@gblues> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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