Re: file_to_string_alloc crashesh when reading large files

From: Anil Mahajan (amahajan@PROXICOM.COM)
Date: 01/21/99


On Wed, 20 Jan 1999 21:49:44 +0100, Ronny Iversen <ronnyi@ifi.uio.no> wrote:

>Anybody knows why file_to_string_alloc crashshesh when reading large
>files and
>how to fix this?
>
>Noc
>

   Yes,  file_to_string_alloc uses an array to store the data from the
file before it allocates it to a string.  If the file is large than
the string, the MUD will most likely crash.
   The easiest way to fix this is just to make the array larger.  I doubt
it's the _best_ solution, but it will fix it (until you're file gets bigger
than this new array).

- Anil


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST