Hi everyone. I'm trying to run smaugfuss, last version, on a raspberry pi4 with raspios, the new substitute of Raspbian. When I run the server, cd smaugfuss/area; ../src/startup 4000, and then try to connect with telnet 127.0.0.1 4000, it works. But, in the moment I insert username, and after that password, when I press enter after password input it crashes.
I'm going to post gdb output.
gdb src/smaug area/core
GNU gdb (Debian 8.2.1-2+b3) 8.2.1
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "aarch64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from src/smaug...done.
[New LWP 3198]
Core was generated by `../src/smaug'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 __GI___libc_free (mem=0x55b6425f7000) at malloc.c:3093
3093 malloc.c: No such file or directory.
Can you be more specific? “Latest version” could be anything,
depending on which web site you got it from. Please provide the filename
you used and a link to where it came from.
I seem to recall a problem with crashes, in an earlier version, due
to it not handling telnet negotiation/subnegotiation.
As for debugging, please see my post at http://www.gammon.com.au/gdb. That describes techniques
for using gdb to track down crashes. Typing “quit” doesn’t tell you
much, not much point in using gdb to do that. Make sure you compile with
debugging information (see that link) and then when it crashes type “bt”
(backtrace) and at least post what you see there.
hi! yes! I got the source from that links. It is 1.9.4. I've compiled it following the gdb guide, and, making a bt in gdb the output is:
(gdb) bt
#0 __GI___libc_free (mem=0x55a1659f7000) at malloc.c:3093
#1 0x0000007fb4ee8648 in __GI__IO_free_backup_area (fp=fp@entry=0x55a1659eff)
at genops.c:190
#2 0x0000007fb4ee8880 in __GI___uflow (fp=0x55a1659eff) at genops.c:322
#3 __GI___uflow (fp=0x55a1659eff) at genops.c:298
#4 0x00000055896cfbc4 in send_ansi_title (ch=0x55a1b4c790) at act_comm.c:2497
#5 0x00000055897843dc in show_title (d=0x55a1b44230) at comm.c:1825
#6 0x0000005589784dcc in nanny_get_old_password (d=0x55a1b44230,
argument=0x7fc74658b8 "admin") at comm.c:2098
#7 0x000000558978702c in nanny (d=0x55a1b44230, argument=0x7fc74658b8 "admin")
at comm.c:2686
#8 0x0000005589781700 in game_loop () at comm.c:860
#9 0x00000055897805a8 in main (argc=1, argv=0x7fc7465e68) at comm.c:532
(gdb)
#0 __GI___libc_free (mem=0x55a1659f7000) at malloc.c:3093
#1 0x0000007fb4ee8648 in __GI__IO_free_backup_area (fp=fp@entry=0x55a1659eff)
at genops.c:190
#2 0x0000007fb4ee8880 in __GI___uflow (fp=0x55a1659eff) at genops.c:322
#3 __GI___uflow (fp=0x55a1659eff) at genops.c:298
#4 0x00000055896cfbc4 in send_ansi_title (ch=0x55a1b4c790) at act_comm.c:2497
#5 0x00000055897843dc in show_title (d=0x55a1b44230) at comm.c:1825
#6 0x0000005589784dcc in nanny_get_old_password (d=0x55a1b44230,
argument=0x7fc74658b8 "admin") at comm.c:2098
#7 0x000000558978702c in nanny (d=0x55a1b44230, argument=0x7fc74658b8 "admin")
at comm.c:2686
#8 0x0000005589781700 in game_loop () at comm.c:860
#9 0x00000055897805a8 in main (argc=1, argv=0x7fc7465e68) at comm.c:532
(gdb)
#0 __GI___libc_free (mem=0x55a1659f7000) at malloc.c:3093
#1 0x0000007fb4ee8648 in __GI__IO_free_backup_area (fp=fp@entry=0x55a1659eff)
at genops.c:190
#2 0x0000007fb4ee8880 in __GI___uflow (fp=0x55a1659eff) at genops.c:322
#3 __GI___uflow (fp=0x55a1659eff) at genops.c:298
#4 0x00000055896cfbc4 in send_ansi_title (ch=0x55a1b4c790) at act_comm.c:2497
#5 0x00000055897843dc in show_title (d=0x55a1b44230) at comm.c:1825
#6 0x0000005589784dcc in nanny_get_old_password (d=0x55a1b44230,
argument=0x7fc74658b8 "admin") at comm.c:2098
#7 0x000000558978702c in nanny (d=0x55a1b44230, argument=0x7fc74658b8 "admin")
at comm.c:2686
#8 0x0000005589781700 in game_loop () at comm.c:860
#9 0x00000055897805a8 in main (argc=1, argv=0x7fc7465e68) at comm.c:532
I hope that this is enough to understand the problems for you that know all much better than me!
How many bytes long is your title file?
Inspect the value of "num" right before the error occurs.
This unsafe code doesn't prevent you from writing past the end of BUFF.
It should be checking the size of the file and allocating an appropriately sized buffer to receive the contents instead of allocating only a fixed amount of space regardless of what file is being read in.
How many bytes long is your title file?
Inspect the value of "num" right before the error occurs.
This unsafe code doesn't prevent you from writing past the end of BUFF.
Consider that I've not edited code. I just downloaded, edited makefile to compile for debugging and compiled! So, is the default one.
the file smaugfuss/system/mudtitle.ans, says 166b