Sam Lantinga <slouken@libsdl.org> [Wed, 10 Jul 2013 21:57:31 -0700] rev 7396
Fixed bug 1953 - Crash at memcpy X11_DispatchEvent(_THIS) Function
Nitz
In Function X11_DispatchEvent(_THIS), case SelectionNotify :
static void
X11_DispatchEvent(_THIS)
{
// Some Code
case SelectionNotify: {
//Some Code
SDL_bool expect_lf = SDL_FALSE;
char *start = NULL; // Initialised with NULL
char *scan = (char*)p.data;
char *fn;
char *uri;
int length = 0;
while (p.count--) {
if (!expect_lf) {
if (*scan==0x0D) {
expect_lf = SDL_TRUE;
} else if(start == NULL) {
start = scan;
length = 0;
}
length++;
} else {
if (*scan==0x0A && length>0) {
uri = malloc(length--);
memcpy(uri, start, length); // Problem is Here, start is still NULL if control comes to else statement without initialising the start pointer, which is wrong
uri[length] = 0;
fn = X11_URIToLocal(uri);
if (fn) SDL_SendDropFile(fn);
free(uri);
}
expect_lf = SDL_FALSE;
start = NULL;
}
scan++;
}
}
As shown above how start pointer remains NULL, Patch for this issue would be:
if (*scan==0x0D) {
expect_lf = SDL_TRUE;
}
if(start == NULL) {
start = scan;
length = 0;
}
Just replace else if statement with if.
Ryan C. Gordon <icculus@icculus.org> [Wed, 10 Jul 2013 23:43:35 -0400] rev 7395
Added src/thread/windows/SDL_systls.c to CMakeLists.txt (thanks, Charles!).
Fixes Bugzilla #1955.
Sam Lantinga <slouken@libsdl.org> [Wed, 10 Jul 2013 20:17:20 -0700] rev 7394
Added PowerPC and ARM versions of the memory barrier functions.
Sam Lantinga <slouken@libsdl.org> [Wed, 10 Jul 2013 18:31:17 -0700] rev 7393
Added release/acquire memory barriers to the atomic API
* Added a destructor to clean up TLS memory at thread shutdown
* Refactored the TLS code to have platform independent code and a small platform dependent core with a fallback to generic code if platform dependent functions fail.
* Fixed recursion issues with SDL_GetErrBuf()
Sam Lantinga <slouken@libsdl.org> [Wed, 10 Jul 2013 02:37:57 -0700] rev 7392
Fixed Haiku build
Sam Lantinga <slouken@libsdl.org> [Wed, 10 Jul 2013 02:32:04 -0700] rev 7391
Implemented an API for thread-local storage: SDL_TLSCreate(), SDL_TLSSet(), SDL_TLSGet()
Jørgen P. Tjernø <jorgen@valvesoftware.com> [Tue, 09 Jul 2013 12:58:54 -0700] rev 7390
SDL_GL_MakeCurrent: Only no-op redundant calls on *same* thread.
This ensures that we only no-op redundant calls if they're made on the
same thread as the last MakeCurrent with those arguments. This should
maek SDL behave better with multithreaded environments.
Jørgen P. Tjernø <jorgen@valvesoftware.com> [Tue, 09 Jul 2013 12:57:12 -0700] rev 7389
Mac: Remove dead FULLSCREEN_TOGGLEABLE code.
This code was written almost 2 years ago, and the flag hasn't been
changed since. Cleaning up the code by removing the conditional blocks,
so that they behave the same way they have for the past two years.
FULLSCREEN_TOGGLEABLE used to cause us to use
-[NSOpenGLContext setFullScreen] and a pixel format with
NSOpenGLPFAFullScreen.
Gabriel Jacobo <gabomdq@gmail.com> [Tue, 09 Jul 2013 13:54:29 -0300] rev 7388
Removing video/uikit/*.c from configure's iOS sources
Unexplicable computer sciences phenomenon: Instead of returning an empty set,
*.c in an folder with no .c files produces the "*.c" string to be added as
a source. I'm sorry future generations, we are doing the best we can :)
Ryan C. Gordon <icculus@icculus.org> [Tue, 09 Jul 2013 11:57:32 -0400] rev 7387
Backout hg changset 898992405fa7; lots of things still use SDL_types.h. :/
Will remove this again at some point in the future, though.
Sam Lantinga <slouken@libsdl.org> [Tue, 09 Jul 2013 08:01:40 -0700] rev 7386
Made the SDL_memset4() comment even clearer so we don't accidentally replace it with memset() in the future.
Sam Lantinga <slouken@libsdl.org> [Tue, 09 Jul 2013 07:13:58 -0700] rev 7385
Backed out commit 898992405fa7 because memset() does a byte fill and SDL_memset4() does a uint32 fill and this change breaks SDL_FillRect()
Gabriel Jacobo <gabomdq@gmail.com> [Tue, 09 Jul 2013 10:25:16 -0300] rev 7384
Adds Input Focus handling on Android to improve pausing/resuming behavior
Ref: http://android-developers.blogspot.com/2011/11/making-android-games-that-play-nice.html
Ryan C. Gordon <icculus@icculus.org> [Mon, 08 Jul 2013 23:37:00 -0400] rev 7383
Removed deprecated SDL_types.h header.
Fixes Bugzilla #1945.
Ryan C. Gordon <icculus@icculus.org> [Mon, 08 Jul 2013 23:22:36 -0400] rev 7382
Replaced SDL_memset4() implementation with a call to SDL_memset().
The implementation was slower than the C runtime on Mac OS X, Linux, and
Windows...quite a bit slower when using the C fallback instead of the inline
asm, too.
Fixes Bugzilla #1755.
Edward Rudd <urkle@outoforder.cc> [Mon, 08 Jul 2013 17:51:17 -0400] rev 7381
change fsaa argument for testgl to accept a # of samples for FSAA
Ryan C. Gordon <icculus@icculus.org> [Mon, 08 Jul 2013 13:26:59 -0400] rev 7380
Disable OSS and BSD audio targets on OpenBSD.
Sam Lantinga <slouken@libsdl.org> [Mon, 08 Jul 2013 09:21:54 -0700] rev 7379
Make sure that srcdir has a full pathname so source indexing works.
Sam Lantinga <slouken@libsdl.org> [Sun, 07 Jul 2013 18:23:04 -0700] rev 7378
Fixed bug 1943 - Wrong handling of legacy 32bpp BMP files
Kang Seonghoon
While BMP format supports alpha channel, it is enabled only when the header is at least 56 bytes long (BITMAPV3INFOHEADER and later). For very common 40-byte-long header (BITMAPINFOHEADER) 32bpp format should be interpreted as BGRX format, but currently SDL interprets them as BGRA format and causes a significant compatibility problem as many 32bpp files use a padding byte of 0 ("transparent" in BGRA interpretation).
---
I fixed this by checking to see if the alpha channel is all 0, and if so, setting it opaque.
Ryan C. Gordon <icculus@icculus.org> [Sun, 07 Jul 2013 20:06:08 -0400] rev 7377
sndio dynamic loading fix.
Sam Lantinga <slouken@libsdl.org> [Sun, 07 Jul 2013 14:08:07 -0700] rev 7376
Backed out changeset c8b16b3a3c9b
Sam Lantinga <slouken@libsdl.org> [Sun, 07 Jul 2013 12:53:21 -0700] rev 7375
Fixed bug 1943 - Wrong handling of legacy 32bpp BMP files
Kang Seonghoon
While BMP format supports alpha channel, it is enabled only when the header is at least 56 bytes long (BITMAPV3INFOHEADER and later). For very common 40-byte-long header (BITMAPINFOHEADER) 32bpp format should be interpreted as BGRX format, but currently SDL interprets them as BGRA format and causes a significant compatibility problem as many 32bpp files use a padding byte of 0 ("transparent" in BGRA interpretation).
Sam Lantinga <slouken@libsdl.org> [Sun, 07 Jul 2013 12:34:26 -0700] rev 7374
Added automated test to validate conversion between all supported formats.
Sam Lantinga <slouken@libsdl.org> [Sun, 07 Jul 2013 12:34:21 -0700] rev 7373
Added surface conversion support for ARGB2101010 formats
Sam Lantinga <slouken@libsdl.org> [Sun, 07 Jul 2013 10:31:01 -0700] rev 7372
Fixed converting ARGB2101010 surfaces to 8-bit surfaces
It's not like this is very useful, but it fixes a crash in this case.
Sam Lantinga <slouken@libsdl.org> [Sun, 07 Jul 2013 10:15:10 -0700] rev 7371
Updated configure with the sndio audio backend
Philipp Wiesemann <philipp.wiesemann@arcor.de> [Sun, 07 Jul 2013 16:15:21 +0200] rev 7370
Corrected name of constant in header file comment.
Philipp Wiesemann <philipp.wiesemann@arcor.de> [Sun, 07 Jul 2013 16:13:17 +0200] rev 7369
Changed include directive to standard header.
Philipp Wiesemann <philipp.wiesemann@arcor.de> [Sun, 07 Jul 2013 16:11:29 +0200] rev 7368
Fixed SDL_RWread() returning -1 as unsigned instead of 0 if error on Android.
Found by Cppcheck (pointed out check of unsigned < 0 which was left in place).
Ryan C. Gordon <icculus@icculus.org> [Sun, 07 Jul 2013 02:03:07 -0400] rev 7367
Added an SDL2 OpenBSD sndio(7) audio target.