Mon, 02 Jan 2017 10:30:32 -0800Fixed bug 3539 - SDL2, missing MIR LDFLAGS
Sam Lantinga <slouken@libsdl.org> [Mon, 02 Jan 2017 10:30:32 -0800] rev 10742
Fixed bug 3539 - SDL2, missing MIR LDFLAGS

Gianfranco

Hello, this is the failure I got

https://launchpadlibrarian.net/300679206/buildlog_ubuntu-zesty-amd64.libsdl2_2.0.5+dfsg1-2ubuntu1_BUILDING.txt.gz

LTLINK build/libSDL2.la
build/.libs/SDL_mirvideo.o: In function `MIR_InitDisplayFromOutput':
././src/video/mir/SDL_mirvideo.c:258: undefined reference to `mir_output_get_current_mode'
collect2: error: ld returned 1 exit status

Sun, 01 Jan 2017 19:10:36 -0800Fixed bug 3529 - SDL_EGL_UnloadLibrary is not called at all on SDL_Quit
Sam Lantinga <slouken@libsdl.org> [Sun, 01 Jan 2017 19:10:36 -0800] rev 10741
Fixed bug 3529 - SDL_EGL_UnloadLibrary is not called at all on SDL_Quit

kaisyu

In case of OpenGLES, the sequences of loading and unloading driver library should be like that:

SDL_Init
...
SDL_GL_LoadLibrary
SDL_EGL_LoadLibrary
...
SDL_Quit
...
SDL_GL_UnloadLibrary
SDL_EGL_UnloadLibrary
...


However, according to my test results, the varible '_this->gl_config.driver_loaded' does not allow 'SDL_GL_UnloadLibrary' to call 'SDL_EGL_UnloadLibrary'.

Thu, 29 Dec 2016 11:49:18 -0500improved SDL_GetError() output generated by EGL code
David Ludwig <dludwig@pobox.com> [Thu, 29 Dec 2016 11:49:18 -0500] rev 10740
improved SDL_GetError() output generated by EGL code

This change attempts to report the EGL error codes generated by SDL's calls
into EGL, along with the name of the EGL function that failed.

Sun, 01 Jan 2017 18:47:29 -0800Run sed in binary mode so we don't have to worry about fixing line endings
Sam Lantinga <slouken@libsdl.org> [Sun, 01 Jan 2017 18:47:29 -0800] rev 10739
Run sed in binary mode so we don't have to worry about fixing line endings

Sun, 01 Jan 2017 18:36:35 -0800Fixed typo in copyright update script
Sam Lantinga <slouken@libsdl.org> [Sun, 01 Jan 2017 18:36:35 -0800] rev 10738
Fixed typo in copyright update script

Sun, 01 Jan 2017 18:33:28 -0800Updated copyright for 2017
Sam Lantinga <slouken@libsdl.org> [Sun, 01 Jan 2017 18:33:28 -0800] rev 10737
Updated copyright for 2017

Sun, 01 Jan 2017 18:32:57 -0800Convert some files back into DOS line endings after updating copyright
Sam Lantinga <slouken@libsdl.org> [Sun, 01 Jan 2017 18:32:57 -0800] rev 10736
Convert some files back into DOS line endings after updating copyright

Sat, 31 Dec 2016 18:11:19 -0800We don't currently support blitting to < 8 bpp surfaces, return an error instead of corrupting memory in that case.
Sam Lantinga <slouken@libsdl.org> [Sat, 31 Dec 2016 18:11:19 -0800] rev 10735
We don't currently support blitting to < 8 bpp surfaces, return an error instead of corrupting memory in that case.

Sat, 31 Dec 2016 16:21:55 -0800Fixed bug 3535 - Misplaced comment #if/#endif closure comment
Sam Lantinga <slouken@libsdl.org> [Sat, 31 Dec 2016 16:21:55 -0800] rev 10734
Fixed bug 3535 - Misplaced comment #if/#endif closure comment

Coriiander

This notice is about a misplaced comment.

Often times when we use an #if #endif sequence, the #endif is followed by a comment to indicate what #if statement it belonged to. The SDL_xaudio2.c file contains a misplaced comment, as follows (I stripped the other comments):

#ifdef __GNUC__
# define SDL_XAUDIO2_HAS_SDK 1
#elif defined(__WINRT__)
# define SDL_XAUDIO2_HAS_SDK
#include "SDL_xaudio2.h"
#else
#if 0
#include <dxsdkver.h>
#if (!defined(_DXSDK_BUILD_MAJOR) || (_DXSDK_BUILD_MAJOR < 1284))
# pragma message("Your DirectX SDK is too old. Disabling XAudio2 support.")
#else
# define SDL_XAUDIO2_HAS_SDK 1
#endif
#endif
#endif /* 0 */



That final /* 0 */ should be moved one line up. Like this (I tabbed it out for you to make it more clear):

Sat, 31 Dec 2016 16:14:51 -0800Fixed bug 3531 - internal SDL_vsnprintf implementation access memory outside given buffer ranges
Sam Lantinga <slouken@libsdl.org> [Sat, 31 Dec 2016 16:14:51 -0800] rev 10733
Fixed bug 3531 - internal SDL_vsnprintf implementation access memory outside given buffer ranges

Tristan

The internal SDL_vsnprintf implementation accesses memory outside buffer. The bug existed also inside the format (%) processing, which was fixed with Bug 3441.

But there is still an invalid access, if we do not have any format inside the source string and the destination string is shorter than the format string. You can use any string for this test, as long it is longer than the buffer.

Example:

va_list argList;
char buffer[4];
SDL_vsnprintf(buffer, sizeof(buffer), "Testing", argList);

The bug is located on the 'else' branch of the format char test:

while (*fmt) {
if (*fmt == '%') {
...
} else {
if (left > 1) {
*text = *fmt;
--left;
}
++fmt;
++text;
}
}
if (left > 0) {
*text = '\0';
}

As you can see that text is always incremented, even when left is already one. When then on the last lines, *text is assigned the NULL char, the pointer is located outside bounds.