30000/30000hp 35340/35360mp 32497/32504mv exp] alias ' ' "
Invalid characters in alias.
Don't even let them use it.
if (strchr(argument, '~') || strchr(argument, '"')){
stc("Invalid characters in alias.\r\n", ch);
return;
}
if (strchr(arg, '~') || strchr(arg, '\'') || strchr(arg, '"')){
stc("Invalid characters in alias.\r\n", ch);
return;
}
> -----Original Message-----
> From: Carlos Moreno [mailto:[EMAIL PROTECTED]
> Sent: Friday, March 21, 2003 7:21 PM
> To: [email protected]
> Subject: ROM 'Crashing'...
>
>
> Hello,
>
> There's a way to 'crash' any ROM...
>
> 1. With any player enter the command -> Alias ' ' "
> 2. Quit
>
> ROM executes in fwrite_char:
>
> fprintf(fp,"Alias %s %s~\n",
> ch->pcdata->alias[pos],
> ch->pcdata->alias_sub[pos]);
>
> and writes to disk the line -> Alias "~
>
> 3. Enter again....
>
> ROM executes in fread_char
>
> ch->pcdata->alias[count] =
> str_dup(fread_word(fp));
> ch->pcdata->alias_sub[count] =
> str_dup(fread_word(fp));
>
> The second fread_word fails with the "Fread_word: word
> too long"
> and exits.
>
> 4. ROM is down.
>
> One way to correct this is to add in the one_argument
> function the next
> lines:
>
> if ( *argument == '\'' || *argument == '"' )
> cEnd = *argument++;
>
> + while ( isspace(*argument) )
> + argument++;
>
> while ( *argument != '\0' )
> {
>
> PS: Sorry if that was already posted.
>
>
>
>
> --
> ROM mailing list
> [email protected]
> http://www.rom.org/cgi-bin/mailman/listinfo/rom
>