Re: fread_string: string to large (db.c)

From: Gary Barnett (gbarnett@POLARNET.COM)
Date: 02/18/98


On Wednesday, February 18, 1998 9:41 PM, S. Mead [SMTP:meadsh@ECE.ORST.EDU]
wrote:
> I got this error while trying to boot up, this is the section of code in
> db.c function char *fread_string that called the error:
>
>     if (length + templength >= MAX_STRING_LENGTH) {
>       log("SYSERR: fread_string: string too large (db.c)");
>       log(error);
>       exit(1);
>
> I don't know what it means, is it trying to reading a text file or
> something?  I don't know what the fread_string function does either...

I think there's a little comment at the beginning of the fread_string
function.. ah yes, here it is.

/* read and allocate space for a '~'-terminated string from a given file */

Also given the line if ( blah >= MAX_blah) I would assume that something is
larger than something is supposed to be. Seeing as the comment tells us it
reads and allocates space for a string from a file, it would seem that the
string is too large for our if check above. This is supported by the error
message saying so.

Two choices: 1) Make your string smaller 2) make your max_string_length
larger. (mine's 8192)

--Mallory


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



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