Re: an unnerving problem

From: Greg Alexander Irvine (
Date: 10/14/95

> well, I added a log entry in stop_snooping(), and it caused a bad 
> problem... it started allocating 100megs of memory to the mud...
> and all I did was add "char *buf;" and before 
> ch->desc->snooping = NULL;
> I added
> sprintf(buf, "(GC) %s has stopped snooping.", GET_NAME(ch));
> mudlog(buf, NRM, LVL_GRGOD, TRUE);

> ANY ideas as to why?

well, you're lucky you dont seg fault.. it appears that you are writing to
a char* (string) that hasnt even been allocated memory space (eg. malloc)

I'd advise doing as jeremy ha throughout the code and use a character
array rather than character pointer..

eg.  char buf[MAX_STRING_LENGTH];


- Greg

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