Re: Ascii pfiles 2.0b

From: Sammy (samedi@ticnet.com)
Date: 06/08/99


From: Nocturnal Occulto <ronnyi@ifi.uio.no>
Sent: Tuesday, June 08, 1999 9:09 AM

>    I have installed the ascii pfile sytem and I love it. Alot easier to
> edit and handle.
>    Unfortunately there is one wierd bug Im unable to fix. The mud
> crashes whenever
>    a player with a name of either 3 or 11 characters logs on. This is so
> wierd and I cant

Straight from the archives (5/5/99):

>> #4  0x80d63c0 in fbclose_for_read (fbfl=0x83f6710) at diskio.c:218
>> 218         free(fbfl->name);
>
>In fbopen_for_read() and fbopen_for_write():
>
>-   if(!(fbfl->name = malloc(strlen(fname)))) {
>+  if(!(fbfl->name = malloc(strlen(fname) + 1))) {
>
>There may be some other string malloc's in there that should allocate an
extra
>byte for the trailing '\0'.  I just added 1 to all of them since it's
>temporary, it's not around for long, and it's easier than looking into it.
>Maybe someday I will.

Sam


     +------------------------------------------------------------+
     | 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