delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/08/09/06:30:02

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-help AT sourceware DOT cygnus DOT com>,
<http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
Date: Mon, 9 Aug 1999 04:27:17 -0600
From: "Kenneth D. Weinert" <kweinert AT earthlink DOT net>
X-Mailer: The Bat! (v1.34a) UNREG / CD5BF9353B3B7091
Reply-To: "Kenneth D. Weinert" <kweinert AT mindspring DOT com>
Organization: Quarterflash Design Group
X-Priority: 3 (Normal)
Message-ID: <9185.990809@mindspring.com>
To: "Nathan Strong" <gblues AT jps DOT net>
CC: <cygwin AT sourceware DOT cygnus DOT com>
Subject: Re: B20: large fread() calls fail
In-reply-To: <000501bee1fd$f645d620$5001010a@gblues>
References: <000501bee1fd$f645d620$5001010a AT gblues>
Mime-Version: 1.0

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 AT earthlink DOT net



--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019