Simple Directmedia Layer
Go to file
Sam Lantinga 41be9756f0 Fixed bug 3546 - SDL_EVDEV_is_console() uses type of wrong size when calling ioctl
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.
2017-01-05 23:26:13 -08:00
acinclude Fixed bug 3481 - Configure fails to detect dynamic library support on powerpc64le 2016-11-06 20:26:48 -08:00
android-project Fixed bug 3444 - Android-TV: no more handling of back button on remote 2016-10-17 22:09:22 -07:00
build-scripts Run sed in binary mode so we don't have to worry about fixing line endings 2017-01-01 18:47:29 -08:00
cmake cmake: Now generates Wayland protocol source bits like the configure script. 2016-10-11 16:36:40 -04:00
debian Updated copyright for 2017 2017-01-01 18:33:28 -08:00
docs Fixed outdated info in README. 2016-10-30 21:01:33 +01:00
include Added SDL_JoystickGetAxisInitialState() to get a joystick axis' initial value. 2017-01-04 10:28:07 -08:00
src Fixed bug 3546 - SDL_EVDEV_is_console() uses type of wrong size when calling ioctl 2017-01-05 23:26:13 -08:00
test Added SDL_JoystickGetAxisInitialState() to get a joystick axis' initial value. 2017-01-04 10:28:07 -08:00
VisualC Refactored the audio queueing code to a generic SDL_DataQueue interface. 2016-12-06 02:23:54 -05:00
VisualC-WinRT WinRT: build fixes 2016-12-10 15:23:17 -05:00
visualtest Updated copyright for 2017 2017-01-01 18:33:28 -08:00
Xcode Updated copyright for 2017 2017-01-01 18:33:28 -08:00
Xcode-iOS Fixed bug 3517 - Compiler warnings with gcc -Wstrict-prototypes 2016-12-26 02:12:21 -08:00
.hgignore wayland: Build own version of core protocol 2016-06-23 18:39:05 +08:00
Android.mk Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
autogen.sh Don't use pushd/popd in autogen.sh; Ubuntu's /bin/sh doesn't support it. 2016-12-26 22:58:58 -05:00
BUGS.txt BUGS.txt: Bugzilla supports SSL; changed link to https:// ... 2016-08-01 13:36:43 -04:00
cmake_uninstall.cmake.in Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
CMakeLists.txt cpuinfo: first attempt at SDL_HasNEON() implementation. 2016-11-17 01:15:16 -05:00
configure Avoid conflicts with multiple versions of udev by first trying the library that is linked with the executable, if any, and then picking the one that is in the build environment. 2016-11-29 05:34:20 -08:00
configure.in Avoid conflicts with multiple versions of udev by first trying the library that is linked with the executable, if any, and then picking the one that is in the build environment. 2016-11-29 05:34:20 -08:00
COPYING.txt Updated copyright for 2017 2017-01-01 18:33:28 -08:00
CREDITS.txt Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
INSTALL.txt Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
Makefile.in wayland: Build own version of core protocol 2016-06-23 18:39:05 +08:00
Makefile.minimal Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
Makefile.pandora Pandora: Fixed referring to no more existing atomic source file in Makefile. 2016-07-19 21:01:13 +02:00
Makefile.psp PSP: Added missing object for generic TLS to Makefile. 2016-02-13 17:34:14 +01:00
Makefile.wiz Pandora: Updated SDL version in Makefile. 2016-07-19 21:01:30 +02:00
README-SDL.txt Another commit to test revision control. 2016-03-08 20:26:26 -05:00
README.txt Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
sdl2-config.cmake.in Applied Ubuntu patch bug_822210_fix_sdl2-config.cmake_whitespace.patch 2016-10-07 15:08:37 -07:00
sdl2-config.in Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
sdl2.m4 Fixed bug 3429 - Update AM_PATH_SDL2() to also check for SDL2.framework 2016-09-29 16:37:08 -07:00
sdl2.pc.in Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
SDL2.spec.in Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
TODO.txt Fixed crash if initialization of EGL failed but was tried again later. 2015-06-21 17:33:46 +02:00
VisualC.html Fixed two typos in documentation. 2016-01-12 22:23:53 +01:00
WhatsNew.txt Added note for David Carlier's work on OpenBSD 2016-10-12 18:57:12 -07:00

                         Simple DirectMedia Layer

                                  (SDL)

                                Version 2.0

---
http://www.libsdl.org/

Simple DirectMedia Layer is a cross-platform development library designed
to provide low level access to audio, keyboard, mouse, joystick, and graphics
hardware via OpenGL and Direct3D. It is used by video playback software,
emulators, and popular games including Valve's award winning catalog
and many Humble Bundle games.

More extensive documentation is available in the docs directory, starting
with README.md

Enjoy!
	Sam Lantinga				(slouken@libsdl.org)