Out-of-bounds access in juce_linux_X11_Windowing.cpp



When an horizontal scroll wheel event happens (with a touchpad for example, or with any device that has more than 5 ‘buttons’), the functions ‘handleButtonReleaseEvent’ and ‘handleButtonPressEvent’ in juce_linux_X11_Windows.cpp are reading outside of the pointerMap array (which is an array of size 5)


Btw, fixing it is just a matter of putting

if (buttonPressEvent.button - Button1 < 5)

before the occurrences of:

switch (pointerMap [buttonPressEvent.button - Button1])
switch (pointerMap [buttonRelEvent.button - Button1])


Thanks - should be fixed on develop shortly.