30 Jan, 2009, Max7288 wrote in the 1st comment:
Votes: 0
Well i got this strange error happening when some one tried to log in while an exsisting player is fighting it will crash the mud. This is the BT of the mud right after its been crashed by the error.

#0 0x0087d57e in strstr () from /lib/tls/libc.so.6
#1 0x080a4708 in Valid_Name (newname=0xbffdb1f0 "zorran") at ban.c:279
#2 0x080c1d9e in nanny (d=0xb7c0a008, arg=0xbffdb610 "zorran") at interpreter.c:1945
#3 0x0804e41b in game_loop (mother_desc=3) at comm.c:869
#4 0x0804e5b4 in init_game (port=1280) at comm.c:479
#5 0x0804e93b in main (argc=3, argv=0xbffdda44) at comm.c:349

I think its in the Nanny function so here's one print of a function that shows up a couple times in that line.

#2 0x080c1d9e in nanny (d=0xb7c0a008, arg=0xbffdb610 "zorran") at interpreter.c:1945
1945 if ((_parse_name(arg, tmp_name)) || strlen(tmp_name) < 2 ||

(gdb) print tmp_name
$2 = "zorran\000\n\000\000\000\000\001\000\000\000\030+\224\n\001\000\000\000\001\000\000\000\020²ý¿baha\000 are wasting my time.\000.\000ss its screen. \"Enter 'bet' to play.\"\000\000", 'd' <repeats 12 times>, "\b¸\231\n ø\223\000P\000\000\000¤'\207\000zorran\000aôß\223\000IJý¿¨²ý¿Á;\207\000IJý¿¤'\207\0000000\000\000\000\000ôß\223\000ä²ý¿È²ý¿Á;\207\000ä²ý¿À5000000\000\000\000\000ÿÿ"…

I get where the Baha part came from, Bahamut is the mob i was fighting when it crashed and Zorran was the character trying to login while the fight.
30 Jan, 2009, Zeno wrote in the 2nd comment:
Votes: 0
Can you show the full line of 1945?
30 Jan, 2009, David Haley wrote in the 3rd comment:
Votes: 0
Actually the backtrace is pointing you to Valid_Name so you should take a look at that function. As for the string you printed, everything after the first null character should be ignored.
30 Jan, 2009, Max7288 wrote in the 4th comment:
Votes: 0
if ((_parse_name(arg, tmp_name)) || strlen(tmp_name) < 2 ||
strlen(tmp_name) > MAX_NAME_LENGTH || !Valid_Name(tmp_name) ||
fill_word(strcpy(buf, tmp_name)) || reserved_word(buf)) {
SEND_TO_Q("Invalid name, please try another.\r\n"
"Name: ", d);
This is the rest of the line from Interperter.C

As for Valid_Name here is the info on that

#1 0x080a4708 in Valid_Name (newname=0xbfed2e00 "zorran") at ban.c:279
279 if (strstr(tempname, invalid_list))

Invalid_List calls for the Xnames
Tempnames print is
$1 = "zorran\000¿1\000\000\000.\000\000\0000\000\000\0000", '\0' <repeats 19 times>, "ÿÿ\000\0000q\002>\000\000\000\000\000\000ÿÿ", '\0' <repeats 12 times>, "\004", '\0' <repeats 15 times>, "\214&í¿t&í¿´&í¿", '\0' <repeats 12 times>, "\214&í¿t&í¿\000\000\000\000\000\000ð?\000\000\000\000\022\005\031\031d\031\031ddd\000\000\000\2245w\000\2245wüÿÿÿ\000\2245w\000\000\000\000\002\000\000\000d\000\000\000ÍÐyC\000\000\000\000ÀÏj\000\000\000\000\000À\206ò·", '\0' <repeats 16 times>, "\004\000\000\000\001\000\000\000\000\000\000\000À$í¿\000\000\000\000"…
30 Jan, 2009, Zeno wrote in the 5th comment:
Votes: 0
Use code tags so we properly see your code. Can you post all of valid_name?
30 Jan, 2009, David Haley wrote in the 6th comment:
Votes: 0
Please use code tags so that things are legible, and also be careful to space out so things don't go italic. Also, since the error is in Valid_Name, we need some more context on that.
30 Jan, 2009, David Haley wrote in the 7th comment:
Votes: 0
Heh, jinx Zeno (twice now).
30 Jan, 2009, Max7288 wrote in the 8th comment:
Votes: 0
/* Does the desired name contain a string in the invalid list? */
for (i = 0; i < num_invalid; i++)
if (strstr(tempname, invalid_list[ i ]))
return (0);

return (1);
}
30 Jan, 2009, Zeno wrote in the 9th comment:
Votes: 0
Is that the full function? What is num_invalid? etc.
30 Jan, 2009, Max7288 wrote in the 10th comment:
Votes: 0
Here this is the Full part of the code that calls for all of the stuff needed


/**************************************************************************
* Code to check for invalid names (i.e., profanity, etc.) *
* Written by Sharon P. Goza *
**************************************************************************/

#define MAX_INVALID_NAMES 200

char *invalid_list[MAX_INVALID_NAMES];
int num_invalid = 0;

int Valid_Name(char *newname)
{
int i;
struct descriptor_data *dt;
char tempname[MAX_INPUT_LENGTH];

/*
* Make sure someone isn't trying to create this same name. We want to
* do a 'str_cmp' so people can't do 'Bob' and 'BoB'. The creating login
* will not have a character name yet and other people sitting at the
* prompt won't have characters yet.
*/
for (dt = descriptor_list; dt; dt = dt->next)
if (dt->character && GET_NAME(dt->character) && !str_cmp(GET_NAME(dt->character), newname))
return (STATE(dt) == CON_PLAYING);

/* return valid if list doesn't exist */
if (!invalid_list || num_invalid < 1)
return (1);

/* change to lowercase */
strcpy(tempname, newname);
for (i = 0; tempname[ i ]; i++)
tempname[ i ] = LOWER(tempname[ i ]);

/* Does the desired name contain a string in the invalid list? */
for (i = 0; i < num_invalid; i++)
if (strstr(tempname, invalid_list[ i ]))
return (0);

return (1);
}


void Read_Invalid_List(void)
{
FILE *fp;
char temp[256];

if (!(fp = fopen(XNAME_FILE, "r"))) {
perror("SYSERR: Unable to open '" XNAME_FILE "' for reading");
return;
}

num_invalid = 0;
while (get_line(fp, temp) && num_invalid < MAX_INVALID_NAMES)
invalid_list[num_invalid++] = str_dup(temp);

if (num_invalid >= MAX_INVALID_NAMES) {
log("SYSERR: Too many invalid names; change MAX_INVALID_NAMES in ban.c");
exit(1);
}

fclose(fp);
}
31 Jan, 2009, Zeno wrote in the 11th comment:
Votes: 0
Can you print invalid_listin the frame, as well as i?
31 Jan, 2009, Max7288 wrote in the 12th comment:
Votes: 0
Printing Invalid_listNo spaces in the I part comes up with
$1 = 0x0
31 Jan, 2009, Zeno wrote in the 13th comment:
Votes: 0
What about i?

Or invalid_list[0]
01 Feb, 2009, Max7288 wrote in the 14th comment:
Votes: 0
I = 46
Invalid List[ 0 ] lists the first name on my Xname list
01 Feb, 2009, Zeno wrote in the 15th comment:
Votes: 0
How about num_invalid?
01 Feb, 2009, Max7288 wrote in the 16th comment:
Votes: 0
(gdb) print num_invalid
$1 = 993090331
01 Feb, 2009, Zeno wrote in the 17th comment:
Votes: 0
Er what, lol.

Do you know where it sets num_invalid?
01 Feb, 2009, Max7288 wrote in the 18th comment:
Votes: 0
greping for Num_invalid these are all that came up

ban.c:int num_invalid = 0;
ban.c: if (!invalid_list || num_invalid < 1)
ban.c: for (i = 0; i < num_invalid; i++)
ban.c: num_invalid = 0;
ban.c: while (get_line(fp, temp) && num_invalid < MAX_INVALID_NAMES)
ban.c: invalid_list[num_invalid++] = str_dup(temp);
ban.c: if (num_invalid >= MAX_INVALID_NAMES) {

Idk if that helps
01 Feb, 2009, Zeno wrote in the 19th comment:
Votes: 0
That's from any .h and .c file?

Where did this code come from?
01 Feb, 2009, Max7288 wrote in the 20th comment:
Votes: 0
This code is the Dragonball Truth Code Circlemud 3.0

Those lines that came up when i grepped for Num_invalid in SRC folder So those are all the lines in the mud that have to do with num_invalid
0.0/39