Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
Bug in will_fall( )
Oct 23, 2017, 1:35 am
By GatewaySysop
Bug in do_zap( ), do_brandish( )
Oct 18, 2017, 1:52 pm
By GatewaySysop
Bug in get_exp_worth( )
Oct 10, 2017, 1:26 am
By GatewaySysop
Bug in do_drag( )
Oct 8, 2017, 12:40 am
By GatewaySysop
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Memwatch
Author: Johan Lindh
Submitted by: Vladaar
Beastmaster 6D sound files
Author: Vladaar
Submitted by: Vladaar
Users Online
CommonCrawl, DotBot, Google, Yahoo!, Sogou

Members: 0
Guests: 13
Stats
Files
Topics
Posts
Members
Newest Member
476
3,704
19,231
608
LAntorcha
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Codebases » SmaugFUSS » Finger bug?!
Forum Rules | Mark all | Recent Posts

Finger bug?!
< Newer Topic :: Older Topic > MUD crashes...

Pages:<< prev 1 next >>
Post is unread #1 Oct 8, 2004, 7:10 pm
Go to the top of the page
Go to the bottom of the page

Anavel
Apprentice
GroupMembers
Posts24
JoinedMar 6, 2005

Not sure if anyone has noticed this before, but when someone goes link dead or gets loaded up with the 'loadup' command and someone uses the finger command on them it crashes the mud.

Program received signal SIGSEGV, Segmentation fault.
0x004e8c9f in do_finger (ch=0x101579e8, argument=0x22f8d7 "obed";)
at finger.c:322
322 ch_printf( ch, "&wIP Info : &G%s\n\r", loaded ? "Unknow
n" : victim->desc->host );
(gdb) bt
#0 0x004e8c9f in do_finger (ch=0x101579e8, argument=0x22f8d7 "obed";)
at finger.c:322
#1 0x004fb6e1 in interpret (ch=0x101579e8, argument=0x22f8d7 "obed";)
at interp.c:550
#2 0x004b88bc in game_loop () at comm.c:649
#3 0x004b7ed9 in main (argc=1, argv=0x100214f8) at comm.c:303
(gdb)

Line 322 in finger.c:
ch_printf( ch, "&wIP Info : &G%s\n\r", loaded ? "Unknown" : victim->desc->host );

And this is Samson's finger snippet. :P
       
Post is unread #2 Nov 5, 2004, 8:42 am   Last edited Nov 5, 2004, 8:44 am by Anavel
Go to the top of the page
Go to the bottom of the page

Anavel
Apprentice
GroupMembers
Posts24
JoinedMar 6, 2005

Forgot to mention this, but here's the fix. Not sure if Samson added the fix to the snippet yet.

Change:
ch_printf( ch, "&wIP Info : &G%s\n\r", loaded ? "Unknown" : victim->desc->host );


To:
          char ipbuf[MAX_STRING_LENGTH];

           if (victim->desc)
              sprintf(ipbuf, "%s@%s", victim->desc->user, victim->desc->host);
          else
              strcpy(ipbuf, "Not Online";);
    ch_printf( ch, "&wIP Info       : &G%s\n\r", ipbuf );


That should fix the bug.
       
Pages:<< prev 1 next >>