Macro listing crashes client after scrolling [Linux client 4.7.2]

Bug reports and discussion about bugs.
Post Reply
User avatar
jezek
Posts: 20
Joined: Tue Mar 10, 2020 3:07 pm

Macro listing crashes client after scrolling [Linux client 4.7.2]

Post by jezek »

Client: TomeNET 4.7.2 for Linux (amd64), complete (sound and music pack included) (147 MB)

Steps to reproduce:
1. Open macro editor (tap '%')
2. Add empty macro to ENTER* key (tap 'e' and then ENTER)
2. List all macro info (tap 'i')
3. Scroll down 5 times (tap spacebar 5 times)

*) see next post for other troubled keys

Current behaviour:
Client crashes with message: *** buffer overflow detected ***: /opt/tomenet-4.7.2-linux-amd64/tomenet terminated

Expected behaviour:
Client lists more macros, or returns to first page if at end.
Last edited by jezek on Thu Mar 12, 2020 5:03 pm, edited 2 times in total.

User avatar
jezek
Posts: 20
Joined: Tue Mar 10, 2020 3:07 pm

Re: Macro listing crashes client after scrolling [Linux client 4.7.2]

Post by jezek »

I just found out, that the macro listing crashes, only if you have some macro mapped on ENTER, BACKSPACE, SPACE or TAB key. Maybe there are more.

User avatar
jezek
Posts: 20
Joined: Tue Mar 10, 2020 3:07 pm

Re: Macro listing crashes client after scrolling [Linux client 4.7.2]

Post by jezek »

Hellou.

Today I made some work and fixed this bug. How can I distribute the fix?

User avatar
jezek
Posts: 20
Joined: Tue Mar 10, 2020 3:07 pm

Re: Macro listing crashes client after scrolling [Linux client 4.7.2]

Post by jezek »

The fix for this bug can be found on github - https://github.com/jezek/tomenet-src/co ... 80e4750ede
Last edited by jezek on Sun Apr 05, 2020 3:51 pm, edited 1 time in total.

mikaelh
Developer
Posts: 201
Joined: Sun Dec 13, 2009 3:18 pm

Re: Macro listing crashes client after scrolling [Linux client 4.7.2]

Post by mikaelh »

You can contribute by sending patches. I guess a commit on Github is pretty much the same thing.

I have some minor complaints about this change:

The comment you wrote is a bit difficult to read.
Excess indentation for the default case.

I guess I would prefer a revised version. If you do revise this, you can also add your name to the comment to credit yourself.

User avatar
jezek
Posts: 20
Joined: Tue Mar 10, 2020 3:07 pm

Re: Macro listing crashes client after scrolling [Linux client 4.7.2]

Post by jezek »

thanks for your answer...
I made it a little bit more readable, I think...

https://github.com/jezek/tomenet/commit ... ff=unified

about the comments, I don't care to be credited for such little changes...
but of course, you can require it, to see who is to blame is something goes wrong ;)

mikaelh
Developer
Posts: 201
Joined: Sun Dec 13, 2009 3:18 pm

Re: Macro listing crashes client after scrolling [Linux client 4.7.2]

Post by mikaelh »

Well, it looks goods enough so I cherry-picked the commit into our own git repository. Thanks for the fix.

Post Reply