This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: B20: large fread() calls fail


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]