mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2025-03-12 04:01:17 +01:00
Rob When calling ioctl(fd, KDGKBTYPE, &type) in SDL_EVDEV_is_console(), we declare type as an 'int'. This should be a 'char'. The subsequent syscall, and kernel code, only writes the lower byte of the word. See: http://lxr.free-electrons.com/source/drivers/tty/vt/vt_ioctl.c?v=4.4#L399 ucval = KB_101; ret = put_user(ucval, (char __user *)arg); I've observed intermittent behavior related to this, and I can force an error condition by using an int initialized to 0xFFFFFFFF. The resulting ioctl will set type to 0XFFFFFF02, and the conditional return in SDL_EVDEV_is_console() will fail. Recommend changing to char, or masking off unused bits. |
||
---|---|---|
.. | ||
SDL_dbus.c | ||
SDL_dbus.h | ||
SDL_evdev.c | ||
SDL_evdev.h | ||
SDL_fcitx.c | ||
SDL_fcitx.h | ||
SDL_ibus.c | ||
SDL_ibus.h | ||
SDL_ime.c | ||
SDL_ime.h | ||
SDL_udev.c | ||
SDL_udev.h |