Re: Re[2]: [MULTI PATCH] Crashes with George'sPatch 058@sps43.candu.aecl.ca>

From: Akuma/Chris Baggett/DOOMer (doomer@BAYOU.COM)
Date: 10/09/97


>(gdb) backtrace
>#0  0x4007643f in strcpy ()
>#1  0x81a9690 in ?? ()

 this right here would seem to be the problem (the above two lines).
it would appear, that in your do_get function, or a little deeper into it
you are trying to copy either
a) into a NULL pointer, or
b) from a NULL pointer.
that would be something like

char *arg = NULL;
strcpy(buf, arg);

you would get something like that.
i would suggest stepping through (oops, you don't know how to use GDB yet).
umm.. . . well i would suggest putting a lot of
log()'s into the function.

like
log("about to strcpy at this line.");
strcpy(yadda, yaddaa);
log("this ones ok.");
it shouldn't be too hard, if you know how to run on a separate port,
and can EASILY recreate the bug.

if you STILL can't get it figured out,
here's an idea.

it may be in this section in do_get

    int amount = 1;
    if (is_number(arg1)) {
      amount = atoi(arg1);
      strcpy(arg1, arg2);
      strcpy(arg2, arg3);
    }
did you make sure that arg1, arg2, arg3 are NOT pointers?
char *arg1;
they are supposed to be
char arg1[MAX_INPUT_LENGTH];
..
..
char arg3[MAX_INPUT_LENGTH];

be VERY careful with this kinda thing.

have fun,
and
Code On
Akuma the Raging Coder

>#2  0x80561e2 in do_get (ch=0x81a7840, argument=0x80a99f5 "all corpse",
>cmd=0,
>    subcmd=0) at act.item.c:319

  +------------------------------------------------------------+
  | "The poets talk about love, but what I talk about is DOOM, |
  |      because in the end, DOOM is all that counts." -       |
  |   Alex Machine/George Stark/Stephen King, The Dark Half    |
  |        "Nothing is IMPOSSIBLE, Just IMPROBABLE"            |
  |   "Easier Said Than Done, But Better Done Than Said..."    |
  +------------------------------------------------------------+


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



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