On Wed, Sep 05, 2018 at 06:17:42PM +0300, Leonid Bobrov wrote: > Hello, trash! > [...]
Do you kiss your mother with that mouth? > [...] > First of all I am not going to recompile this game with debugging > symbols only because your ports system doesn't want to compile > everything with debug support by default. > [...] Kind of a sane default, it seems to me. > [...] > Second, my first thought was that this game is so retarded > [...] I know that you might be agitated that the game's not working. Using that kind of language doesn't incline people to help you though. > [...] > it crashes when OpenBSD's src repo is not checked out > [...] What made you think that? > [...] > , but now I won't > surprice if that was a buffer overflow. > [...] To me, this looks more like an unterminated string fed to strcmp(3). The point of code where it crashes (convert_old_savegame) leads me to assume that this path of code might not be too well tested. Have you opened a bug report upstream for this? Failing that, you could poke around convert_old_savegame and try to see if you can discover where and how an unterminated string ends up in a call to strcmp. Maybe it's something as simple as adding a NULL check before that call... > [...] > Before checking out src repo: > (gdb) run -wn > Starting program: /usr/local/bin/freedroidRPG -wn > > Hello, this is FreedroidRPG, version 0.16.1. > > Video system type: x11. > Using screen resolution 1366 x 768. > [New thread 287207] > [New thread 189085] > > Thread 1 received signal SIGSEGV, Segmentation fault. > strcmp () at /usr/src/lib/libc/arch/amd64/string/strcmp.S:45 > 45 /usr/src/lib/libc/arch/amd64/string/strcmp.S: No such file or > directory. > (gdb) bt > #0 strcmp () at /usr/src/lib/libc/arch/amd64/string/strcmp.S:45 > #1 0x00000bc6e628a46d in convert_old_savegame () > #2 0x00000bc6e624f798 in load_saved_game () > #3 0x00000bc6e62447b3 in load_named_game () > #4 0x00000bc6e6245200 in do_savegame_selection_and_act () > #5 0x00000bc6e6244b59 in Single_Player_Menu () > #6 0x00000bc6e6242c67 in Startup_handle () > #7 0x00000bc6e6244d23 in RunSubMenu () > #8 0x00000bc6e62446d7 in RunMenu () > #9 0x00000bc6e623c4b5 in main () > > After checking out src repo: > (gdb) run -wn > Starting program: /usr/local/bin/freedroidRPG -wn > > Hello, this is FreedroidRPG, version 0.16.1. > > Video system type: x11. > Using screen resolution 1366 x 768. > [New thread 110599] > [New thread 575572] > > Thread 1 received signal SIGSEGV, Segmentation fault. > strcmp () at /usr/src/lib/libc/arch/amd64/string/strcmp.S:45 > 45 movq 8(%rdi),%rax > (gdb) bt > #0 strcmp () at /usr/src/lib/libc/arch/amd64/string/strcmp.S:45 > #1 0x00001e0e2638a46d in convert_old_savegame () > #2 0x00001e0e2634f798 in load_saved_game () > #3 0x00001e0e263447b3 in load_named_game () > #4 0x00001e0e26345200 in do_savegame_selection_and_act () > #5 0x00001e0e26344b59 in Single_Player_Menu () > #6 0x00001e0e26342c67 in Startup_handle () > #7 0x00001e0e26344d23 in RunSubMenu () > #8 0x00001e0e263446d7 in RunMenu () > #9 0x00001e0e2633c4b5 in main () > -- Gregor