Re: [Code] Ascii Pfiles 2.0b file buffering system problems

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


From: The Fractal Dimension <fractal@OBERON.KRANS.COM>
Sent: Tuesday, May 04, 1999 5:42 AM


> #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
p.s.  I still have no plans to do anything with the public release.  I just
happen to be redebugging it for a new mud.  If I have some free time I may
release a pl15 version with all the bugfixes I've been doing.


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