window-maker / wmaker

Mirror of the official repository repo.or.cz/wmaker-crm.git. Do not send pull requests here, send your patches to wmaker-dev@googlegroups.com instead
https://repo.or.cz/wmaker-crm.git
GNU General Public License v2.0
136 stars 18 forks source link

out-of-bounds in menu->entries array #23

Closed rodan closed 1 year ago

rodan commented 1 year ago

bug description: after menu is displayed I get a segfault when trying to hover over the last menu entry. it looks like under some circumstances menu->entries[] gets accessed past the last valid value (off by one).

how to reproduce: right-click desktop to show menu and keep right mouse button pressed sweep mouse up-down the menu a few times - it crashes all the time between 1-5 sweeps

this commit fixes the unwanted behaviour, in active use since december 2021.

d-torrance commented 1 year ago

Thanks for the patch!

However, patches are accepted on the mailing list and not via pull requests here. I went ahead and submitted it for you [1, 2].

[1] https://groups.google.com/g/wmaker-dev/c/E2Wx4yoHjj0/m/MFOA1cLIGwAJ [2] https://groups.google.com/g/wmaker-dev/c/GJYsWq0sGgk/m/tX-xsMLIGwAJ

d-torrance commented 1 year ago

FYI, this patch has been applied to the next branch:

https://repo.or.cz/wmaker-crm.git/commitdiff/c089c6aea4c948762e4f8098ddb84743356401cb?hp=66b0ee3c4daf5892db836879cd092ed22dc62c8d

rodan commented 1 year ago

thank you!

crmafra commented 1 year ago

On Fri, 6 Jan 2023 at 20:07:27 -0800, Petre Rodan wrote:

thank you!

Thank you for the patch! All wmaker users appreciate it.