View Single Post
Re: Bug-NUM_FOR_EDICT Error: Bad Pointer
Old
  (#58)
Whistler
Summoner
 
Whistler's Avatar
 
Status: Offline
Posts: 1,499
Join Date: Feb 2004
Location: Mist Village
Default Re: Bug-NUM_FOR_EDICT Error: Bad Pointer - 16-05-2004

like this, if ANY user connected to a server running RACC typed a command which is more than 128 characters will cause buffer overrun and crash the server...
Code:
      char pcmd[129]; // no way, I hate pointers...
      char arg1[129];
      char arg2[129];

      strcpy (pcmd, CMD_ARGV (0));
      strcpy (arg1, CMD_ARGV (1));
      strcpy (arg2, CMD_ARGV (2));