socials bug

From: FourSpace (realm@styx.ph.msstate.edu)
Date: 03/15/96


Stumbled across a bug in the boot_social_messages() routine.      
The soc_mess_list array is malloc'd with a number of elements
equal to the number of commands in cmd_info[] with the
command_pointer == do_action.

however, it is possible to include socials in the file lib/misc/socials
that do not correspond with a command in cmd_info.  The routine notes
such socials, but that is all.  You end up overwriting the memory you
malloc'd for the soc_mess_list array.

It is possible to simply exit when you find an unknown social in the
file.  I believe it is better to allow booting despite the rogue
socials.  The way I hacked it was to first read all the socials into
a temporary array, then copy only the usable ones into the soc_mess_list
array.

If you know of a better way, let's hear it.

Fireball



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