Sat, 16 Mar 2019 19:44:04 -0700Fixed Mac OS X build
Sam Lantinga <slouken@libsdl.org> [Sat, 16 Mar 2019 19:44:04 -0700] rev 12655
Fixed Mac OS X build

Sat, 16 Mar 2019 19:32:59 -0700Fixed configure error if pkg modules aren't available
Sam Lantinga <slouken@libsdl.org> [Sat, 16 Mar 2019 19:32:59 -0700] rev 12654
Fixed configure error if pkg modules aren't available

Sat, 16 Mar 2019 19:16:24 -0700CVE-2019-7637: Fix in integer overflow in SDL_CalculatePitch SDL-1.2
Petr Písař <ppisar@redhat.com> [Sat, 16 Mar 2019 19:16:24 -0700] rev 12653
CVE-2019-7637: Fix in integer overflow in SDL_CalculatePitch
If a too large width is passed to SDL_SetVideoMode() the width travels
to SDL_CalculatePitch() where the width (e.g. 65535) is multiplied by
BytesPerPixel (e.g. 4) and the result is stored into Uint16 pitch
variable. During this arithmetics an integer overflow can happen (e.g.
the value is clamped as 65532). As a result SDL_Surface with a pitch
smaller than width * BytesPerPixel is created, too small pixel buffer
is allocated and when the SDL_Surface is processed in SDL_FillRect()
a buffer overflow occurs.

This can be reproduced with "./graywin -width 21312312313123213213213"
command.

This patch fixes is by using a very careful arithmetics in
SDL_CalculatePitch(). If an overflow is detected, an error is reported
back as a special 0 value. We assume that 0-width surfaces do not
occur in the wild. Since SDL_CalculatePitch() is a private function,
we can change the semantics.

CVE-2019-7637
https://bugzilla.libsdl.org/show_bug.cgi?id=4497

Signed-off-by: Petr Písař <ppisar@redhat.com>

Sat, 16 Mar 2019 19:08:59 -0700emscripten: force resize event when pixel ratio changes
Sebastian Krzyszkowiak <dos@dosowisko.net> [Sat, 16 Mar 2019 19:08:59 -0700] rev 12652
emscripten: force resize event when pixel ratio changes
Without this, applications can't react to changed canvas size on window zoom.

Sat, 16 Mar 2019 19:07:34 -0700Fixed bug 4450 - SDL_mouse.c fails to compile with CMake generated Visual Studio files if SDL_VIDEO_VULKAN 0/undefined
Sam Lantinga <slouken@libsdl.org> [Sat, 16 Mar 2019 19:07:34 -0700] rev 12651
Fixed bug 4450 - SDL_mouse.c fails to compile with CMake generated Visual Studio files if SDL_VIDEO_VULKAN 0/undefined

Max Waine

SDL_mouse.c, if compiled for Windows, requires GetDoubleClickTime to compile (available from winuser.h). Without Vulkan present this fails to compile as the include chain for winuser.h is the following.

SDL_mouse.c -> SDL_sysvideo.h -> SDL_vulkan_internal.h -> SDL_windows.h -> windows.h -> winuser.h.
Problem is that SDL_vulkan_internal.h doesn't include SDL_windows.h if Vulkan isn't present, so under MinGW/GCC it will give a -Wimplicit-function-declaration warning for GetDoubleClickTime, and under MSVC fails to compile completely.

The solution to this would be to simplify the include chain: including SDL_windows.h under the same condition as GetDoubleClickTime (#ifdef __WIN32__) in SDL_mouse.c (or another file that isn't quite so indirectly included).

Sat, 16 Mar 2019 19:03:13 -0700Fixed bug 4511 - SDL_gamecontrollerdb Mapping for Sony Playstation USB controller
Sam Lantinga <slouken@libsdl.org> [Sat, 16 Mar 2019 19:03:13 -0700] rev 12650
Fixed bug 4511 - SDL_gamecontrollerdb Mapping for Sony Playstation USB controller

Renaud Lepage

Simply submitting a new mapping.

Thu, 14 Feb 2019 20:46:58 +0100Fixed DualShock 3 mapping
Silent <zdanio95@gmail.com> [Thu, 14 Feb 2019 20:46:58 +0100] rev 12649
Fixed DualShock 3 mapping

Sat, 16 Mar 2019 18:48:21 -0700Fixed bug 4525 - Fix crash in ALSA_HotplugThread caused by bad return value check
Sam Lantinga <slouken@libsdl.org> [Sat, 16 Mar 2019 18:48:21 -0700] rev 12648
Fixed bug 4525 - Fix crash in ALSA_HotplugThread caused by bad return value check

Anthony Pesch

Fix snd_device_name_hint return value check

According to the ALSA documentation, snd_device_name_hint returns 0 on
success, otherwise a negative error code. The code previously only
considered -1 to be an error, which let other error codes through
resulting in a segfault when hints (which was NULL) was dereferenced

Sat, 16 Mar 2019 18:45:10 -0700Fixed bug 4544 - SDL2.m4 SDL2.framework patch made it impossible to fail detection
Sam Lantinga <slouken@libsdl.org> [Sat, 16 Mar 2019 18:45:10 -0700] rev 12647
Fixed bug 4544 - SDL2.m4 SDL2.framework patch made it impossible to fail detection

Stian Skjelstad

check if $sdl_framework is set, before checking if directory exists

Patch that was merged here https://hg.libsdl.org/SDL/rev/9befd0acb9ef made it impossible for the SDL2 detection to fail, since one of the if statements fails to check if a variable is set or not.

if test -d $sdl_framework; then

can evaluate to true in some shells. I guess it falls into undefined behaviour when looking at the POSIX standard.

Sat, 16 Mar 2019 18:35:33 -0700Reject 2, 3, 5, 6, 7-bpp BMP images SDL-1.2
Petr Písař <ppisar@redhat.com> [Sat, 16 Mar 2019 18:35:33 -0700] rev 12646
Reject 2, 3, 5, 6, 7-bpp BMP images
BMP decoder assumes less than 8 bit depth images have 1 or 4 bits
per pixel. No other depths are correctly translated to an 8bpp
surface.

This patch rejects loading these images.

https://bugzilla.libsdl.org/show_bug.cgi?id=4498
Signed-off-by: Petr Písař <ppisar@redhat.com>