[PATCH] Fix key_down_event SEGFALT
I discovered by messing around that using key_down_event with a large random value (ex SPACE | MP_NO_REPEAT_KEY) can cause a segfalt. I found the problem to be that isprint is only defined for values in the range of an unsigned char and the value EOF. The patch adds a simple check before isprint in mp_input_get_key_name to make sure the value is in isprint's range.
On Wed, Apr 02, 2014 at 04:14:13PM -0600, spunit262 . wrote:
I discovered by messing around that using key_down_event with a large random value (ex SPACE | MP_NO_REPEAT_KEY) can cause a segfalt. I found the problem to be that isprint is only defined for values in the range of an unsigned char and the value EOF. The patch adds a simple check before isprint in mp_input_get_key_name to make sure the value is in isprint's range.
Sorry for the extreme delay, I somehow missed this and a few other patches. Finally pushed. Thanks, Reimar
participants (2)
-
Reimar Döffinger -
spunit262 .